Solved

Image Transparency

Posted on 2002-06-07
9
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this tutorial viewers will learn how to create blended and gradiated shapes in Illustrator using the blend tool Draw two shapes, one of them in a different color: Select both and create a blend by going to Object > Blend > Make: Blends can also b…
Not only does Prezi allow you to create non-linear presentations, it also makes it easy to apply transition animations between your frames. Learn how to apply a fade-in transition to select items and entire frames in this tutorial Select "Edit Path"…

726 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