Message-ID: <3B0F3AF7.BD301B66@futureone.com> Date: Fri, 25 May 2001 22:11:19 -0700 From: Gary X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.delphi.graphics Subject: Re: Problems with created .bmp files References: <3b0e50a1.3781668@newsgroups.borland.com> <3b0e9f72_2@dnews> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 208.186.37.169 X-Trace: dnews 990837580 208.186.37.169 (25 May 2001 17:39:40 -0700) Lines: 42 Path: dnews Xref: dnews borland.public.delphi.graphics:39202 I don't believe it. TBitmap.Dormant! I've been using Kodak's Photostyler forever, won't open a Delphi bitmap most of the time. I've tried a hundred ways to fix it over the years, and was working on a project an hour ago where the problem came up... My work around had been to not use the offending pixel formats. It's been driving me nuts since about a week after D-1 was released, this fixed it, finally! It's sooo simple. Many thanks, Gary Peter Haas wrote: > Hi Ian, > > Ian wrote in <3b0e50a1.3781668@newsgroups.borland.com>: > > I have a program in which the user can create .bmp files from bitmaps > > created by the program. > > > > I have set the pixel format to 24 bit. > > I think this is the cause. > > > However one user has reported > > that PhotoEditor cannot read the file, whilst all their other programs > > can ( I don't have PhotoEditor ) > > There is a problem with any Delphi versions (fixed in Delphi5). TBitmap > save additionally the palette, but do not set the bitmap file header > data correct for this. > > You can patch the header, you must add (TBitmapInfoHeader).biClrUsed * > SizeOf(TRGBQuad) (e.g. 1024) to bfSize and bfOffBits. > > But better is to prevent the saving of the palette. Use TBitmap.Dormant > after the set of TBitmap.PixelFormat for this. > > Bye Peter.