BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delphi Bitmap Issue

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Vertuas
Guest





PostPosted: Wed Apr 18, 2007 2:53 am    Post subject: Delphi Bitmap Issue Reply with 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
Back to top
Lord Crc
Guest





PostPosted: Wed Apr 18, 2007 3:48 am    Post subject: Re: Delphi Bitmap Issue Reply with quote



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





PostPosted: Wed Apr 18, 2007 8:11 am    Post subject: Re: Delphi Bitmap Issue Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.