Jump to content

peter2005

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. peter2005

    record with null-terminated string

    After reading all the responses I realized there is no easy way.... My description is correct , it's a null-terminated ASCII string(one character one byte, no special ones), its length is not stored anywhere. Using static array only fixes problem of missing a first byte.... What I wanted to avoid the most is reading the string byte by byte until #0 is found. I'll try this way. Perhaps but the file I want to read was created in Visual Studio ..so I presume in C++ are "normal" ways to read #0 strings.
  2. How can I read content of (typed) file of different data types when one of them is null-terminated string? Something like this: THeader = Record flags : integer; dummy : integer; name: string; padding: integer; end; This would work fine if it were not for string field. By definition a record has to be of fixed size but generally strings are not. Another problem with string is the first byte is omitted since it is considered to be length. Most likely Record cannot be used for my purpose...is there anything else?
  3. peter2005

    32bit bitmap

    Yes, it works, thanks. Unfortunately Tbitmap in D7 does not have AlphaFormat property.
  4. peter2005

    32bit bitmap

    Here is small bmp image. There is a transparent background and greyishblack shadow at the bottom. The background is not the problem Image1.Transpartent=False removes it, but the shadow is always fully black. Can it be loaded and displayed properly? 1.bmp
  5. peter2005

    32bit bitmap

    Lazarus(free pascal) can handle these bitmaps without any trouble. I try to avoid installing third party component because it complicates transferring my projects , it has to be installed, even worse when it's for a simple thing like displaying bitmap. Do you have any suggestion of component which could work in my case? Probably should not even mention that I use Delphi 7 TBitmap allows access to individual pixels which I need to rearrange, no idea if TPNGImage can do that.
  6. peter2005

    32bit bitmap

    hi, for unclear reason delphi does not completely support 32 bit bitmaps. I'm trying to display a 32bit picture data(with alpha channel) in a TImage using TBitmap and have not found a proper way, some parts of the picture are just black. Interesting is that the image although not properly displayed can be saved into a file(image1.Picture.Bitmap.SaveToFile) and works perfectly fine in a picture viewer. Alternative is to use PNG which uses alpha channel however it complicates whole situation since TBitmap is easy to use. I do not want use 3rd-part components or huge libraries ....a code code snippet or an unit to include would be great.
×