Board index » delphi » Bug in TBitmap.SaveToFIle ?

Bug in TBitmap.SaveToFIle ?

Hi,

    When I try to open a bitmap saved using TBitmap.SaveToFile with
Adobe Photoshop 5.0
it refuses to open it, saying "Coud not open the document because the
file-format module
cannot parse the file." Ms Paint can open the bitmap fine though.

    Anyone ever had this bug ? What can I do ?

Regards,
D. Filion

 

Re:Bug in TBitmap.SaveToFIle ?


Quote
D. Filion wrote in message <362E778F.60CBE...@homemail.com>...
>Hi,

>    When I try to open a bitmap saved using TBitmap.SaveToFile with
>Adobe Photoshop 5.0
>it refuses to open it, saying "Coud not open the document because the
>file-format module
>cannot parse the file." Ms Paint can open the bitmap fine though.

What do you know about this bitmap?  What PixelFormat is it?

efg
_________________________________________
efg's Computer Lab:  http://infomaster.net/external/efg

Earl F. Glynn                 E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

Re:Bug in TBitmap.SaveToFIle ?


You didn't say what version of Delphi you're using.  For versions prior to
3.0, bitmaps are written to disk using the pixel format of the screen
device.  So, if your video mode is 16 bits per pixel (65k colors), that's
what format the BMP file will be written in.

Starting with Delphi 3.0, TBitmap supports full DIB operations.  New
bitmaps default to matching the screen pixel format, but you can change the
pixel format of a bitmap using the PixelFormat property.

It sounds like you are running your video card in one of the less common
pixel format modes (like 16bpp or 15bpp) and Photoshop doesn't know how to
read BMP files in that pixel format.

-Danny

D. Filion <dfil...@homemail.com> wrote in article
<362E778F.60CBE...@homemail.com>...

Quote
> Hi,

>     When I try to open a bitmap saved using TBitmap.SaveToFile with
> Adobe Photoshop 5.0
> it refuses to open it, saying "Coud not open the document because the
> file-format module
> cannot parse the file." Ms Paint can open the bitmap fine though.

>     Anyone ever had this bug ? What can I do ?

> Regards,
> D. Filion

Re:Bug in TBitmap.SaveToFIle ?


 I am using Delphi 3.0 and encountered problems saving/reloading tBitmaps
to/from a tStream.
I found out that there are Problems, if the PixelFormat = pfDevice. So if  I
save the pfDevice picture (may be rtl-compressed) and reload it, it will
totally mess up the memory of the application. (Acces Violation Screen with
HexDump, Application aborts). This only happens with pfDevice.

tv

Other Threads