| View previous topic :: View next topic |
| Author |
Message |
Vertuas Guest
|
Posted: Wed Apr 18, 2007 2:53 am Post subject: Delphi Bitmap Issue |
|
|
Hi all
I have a problem opening bitmap images from my delphi application. The
images in question are ones produced in Adobe Photoshop and saved as Windows
bitmaps (as opposed to OS2 files).
When t try to load one of these images into a TBitmap i get a stream read
error. My own investigation has lead me to the conclusion that for some
reason the TStream object in TBitmap.ReadDIB is refusing to read the last
two bytes of the pixel data.
Does anyone know why this is happening?
The images load perfectly in Windows and MS Paint.
Ta |
|
| Back to top |
|
 |
Lord Crc Guest
|
Posted: Wed Apr 18, 2007 3:48 am Post subject: Re: Delphi Bitmap Issue |
|
|
On Tue, 17 Apr 2007 22:53:09 +0100, "Vertuas" <vertuas (AT) hotmail (DOT) com>
wrote:
| Quote: | Does anyone know why this is happening?
|
Yes, read this QC report, it also has a work-around:
http://qc.codegear.com/wc/qcmain.aspx?d=8398
This was fixed in Delphi 2005.
- Asbjørn |
|
| Back to top |
|
 |
David J Taylor Guest
|
Posted: Wed Apr 18, 2007 8:11 am Post subject: Re: Delphi Bitmap Issue |
|
|
Vertuas wrote:
| Quote: | Hi all
I have a problem opening bitmap images from my delphi application. The
images in question are ones produced in Adobe Photoshop and saved
as Windows bitmaps (as opposed to OS2 files).
When t try to load one of these images into a TBitmap i get a stream
read error. My own investigation has lead me to the conclusion that
for some reason the TStream object in TBitmap.ReadDIB is refusing to
read the last two bytes of the pixel data.
Does anyone know why this is happening?
The images load perfectly in Windows and MS Paint.
Ta
|
Adobe Photoshop writes invalid bitmaps. I had to update my own bitmap
reading routines to bypass the problem. The fix to which Lord Crc pointed
may work for you.
Cheers,
David |
|
| Back to top |
|
 |
|