Posted on 1998-12-11
I think this may be a little known fact...but hidden on the Delphi 3 CD ROM is a folder called INFO. Inside of the INFO folder is another folder called EXTRAS. Inside of EXTRAS is a folder called JPEG.
The JPEG folder is pretty cool. It has files you can install that allow you to use a TImage component to view JPEG images. JPEG images have a compression algorithm which allows them to take up a lot less space than an equivalent .BMP image.
I installed JPEG support into my copy of Delphi 3...and sure enough...now I can view JPEGS in Delphi 3. I was pretty excited.
But now, I can't utilize any of the other methods that make TImage so cool. For example...when I try to draw a Focus Rect on the JPEG image...the program crashes / give me an error message:
EInvalidOperation: Can only modify an image if it contains a bitmap
Can someone help me figure out what to do? It seems silly to allow TImage to load JPEG images...but then you can't do anything with them.
If I load a bitmap instead of a JPEG...I can use all of the methods of TImage with no problems.