Solved

Image Transparency

Posted on 2002-06-07
9
282 Views
Last Modified: 2013-11-19
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).
0
Comment
Question by:WoodyJ007
  • 5
  • 3
9 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7061511
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
 

Author Comment

by:WoodyJ007
ID: 7061530
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
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7061551
>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
 

Author Comment

by:WoodyJ007
ID: 7061624
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:Stormmin66
ID: 7062269
add JPEG to uses
0
 

Author Comment

by:WoodyJ007
ID: 7066372
I've already tried that.  It throws loads of compiler errors.  jpg.pas and jpeg.pas must be different.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 200 total points
ID: 7066378
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
 

Author Comment

by:WoodyJ007
ID: 7066417
Spot on!  Thanks.

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

Cheers
Woody.
0
 

Author Comment

by:WoodyJ007
ID: 7066418
Spot on!  Thanks.

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

Cheers
Woody.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Microsoft Paint 10 61
How to call a form that is in a DLL  from an application? 13 65
Delphi selector screen 2 70
Magic Software info 18 125
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …
Learn how to download your full Prezi presentation for offline presenting. Prezi doesn’t have to be viewed and shared in a web browser, even with a free account you can download your full presentation to share with others. Be sure to download any vi…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now