Image Transparency

Hi guys,
   Does anyone know of a component that allows transparency for images other than .bmp's?

Setting Transparency to true when a bitmap is loaded into a TImage component makes it transparent.  I need to do this to another image format (bitmaps are just too big to store).  Any suggestions on components and what image format to use (png, jpeg etc).
WoodyJ007Asked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
if you have to recreate the jpg-dcu file because graphicex
download this file from mike lischke

http://scripts.delphi-gems.com/download2.php?ID=7

meikl ;-)
0
 
kretzschmarCommented:
you could use jpg and assign the
jpg as bitmap into the
timage.picture.bitmap-property like

jpgobject.loadfromfile('AFilename');
image1.picture.bitmap.assign(jpgobject);
//do your transparency now

meikl ;-)
0
 
WoodyJ007Author Commented:
I've found that converting from jpegs to bitmaps is slow and never a perfect conversion.

I'm writing some software that will have thousands of images that some of which will overlay on each other.  I need it to be as quick as possible and storage (in SQL server) to be as small as possible.

I was thinking of using Png's but I'm not sure on performance.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
kretzschmarCommented:
>I've found that converting from
>jpegs to bitmaps is slow and never
>a perfect conversion.

depends on how big is the image and
how was the compression<->quality ratio

for png you need a converter for display,
for this look for the graphicEx lib
from mike lischke at www.lischke-online.de

meikl ;-)

0
 
WoodyJ007Author Commented:
OK.  I think I've decided on pngs but the graphicEX lib seems to be looking for jpg.pas.  The DCU is there but it still won't run.

I'm using Delphi6 so maybe the dcu was complied under another version and isn't compatible.

Does anyone have the source for jpg.pas ??

cheers
0
 
Stormmin66Commented:
add JPEG to uses
0
 
WoodyJ007Author Commented:
I've already tried that.  It throws loads of compiler errors.  jpg.pas and jpeg.pas must be different.
0
 
WoodyJ007Author Commented:
Spot on!  Thanks.

It adds png support to the standard controls which make my life loads easier.

Cheers
Woody.
0
 
WoodyJ007Author Commented:
Spot on!  Thanks.

It adds png support to the standard controls which makes my life loads easier.

Cheers
Woody.
0
All Courses

From novice to tech pro — start learning today.