Problem with PNG graphics in Delphi

I am not a programmer, I am a graphic designer and worked on some images for a program being written in Delphi (I am uncertain of the version).  The problem seems to be that no matter what size I create the image, Delphi distorts it and creates what appear to be "holes" in the image that are transparent and show the background color

What can we do to fix this issue if anything?

Any help would be greatly appreciated.
0
Kristina
3/27/2010 1:12:19 PM
embarcadero.delphi.graphics 928 articles. 0 followers. Follow

7 Replies
1623 Views

Similar Articles

[PageSpeed] 43
Get it on Google Play
Get it on Apple App Store

Am 27.03.2010 14:12, schrieb Kristina Thompson:
> I am not a programmer, I am a graphic designer and worked on some images for a program being written in Delphi (I am uncertain of the version).  The problem seems to be that no matter what size I create the image, Delphi distorts it and creates what appear to be "holes" in the image that are transparent and show the background color
>
> What can we do to fix this issue if anything?
>
> Any help would be greatly appreciated.

Delphi (depending on the version) is able to draw a tranaparent image 
using a specific color to indicate these transparent pixels. Each pixel 
having this color will be drawn in the background color.

Changing the TransparentColor property in Delphi might help here.

If there is no specific transparent color given, Delphi tends to use the 
color of the lower left pixel for that.
0
Uwe
3/27/2010 1:27:48 PM
> {quote:title=Uwe Raabe wrote:}{quote}
> Am 27.03.2010 14:12, schrieb Kristina Thompson:
> > I am not a programmer, I am a graphic designer and worked on some images for a program being written in Delphi (I am uncertain of the version).  The problem seems to be that no matter what size I create the image, Delphi distorts it and creates what appear to be "holes" in the image that are transparent and show the background color
> >
> > What can we do to fix this issue if anything?
> >
> > Any help would be greatly appreciated.
> 
> Delphi (depending on the version) is able to draw a tranaparent image 
> using a specific color to indicate these transparent pixels. Each pixel 
> having this color will be drawn in the background color.
> 
> Changing the TransparentColor property in Delphi might help here.
> 
> If there is no specific transparent color given, Delphi tends to use the 
> color of the lower left pixel for that.

Thank you very much for your response.  

 wish I had a way to show you the image itself so you could see precisely what I mean but, I will pass that information on to the developer.  Will this also help with the distortion that is being created?
0
Kristina
3/27/2010 1:35:14 PM
Am 27.03.2010 14:35, schrieb Kristina Thompson:
>> {quote:title=Uwe Raabe wrote:}{quote}
>> Am 27.03.2010 14:12, schrieb Kristina Thompson:
>>> I am not a programmer, I am a graphic designer and worked on some images for a program being written in Delphi (I am uncertain of the version).  The problem seems to be that no matter what size I create the image, Delphi distorts it and creates what appear to be "holes" in the image that are transparent and show the background color
>>>
>>> What can we do to fix this issue if anything?
>>>
>>> Any help would be greatly appreciated.
>>
>> Delphi (depending on the version) is able to draw a tranaparent image
>> using a specific color to indicate these transparent pixels. Each pixel
>> having this color will be drawn in the background color.
>>
>> Changing the TransparentColor property in Delphi might help here.
>>
>> If there is no specific transparent color given, Delphi tends to use the
>> color of the lower left pixel for that.
>
> Thank you very much for your response.
>
>   wish I had a way to show you the image itself so you could see precisely what I mean but, I will pass that information on to the developer.  Will this also help with the distortion that is being created?

It depends on how the image is displayed with Delphi. For instance, the 
TImage component has a property "Stretch" which, when true, will resize 
the picture to the width and height of the TImage component disregarding 
the width and height of the original image.

A little bit more information would be helpful.
0
Uwe
3/27/2010 1:50:03 PM
> {quote:title=Uwe Raabe wrote:}{quote}
> Am 27.03.2010 14:35, schrieb Kristina Thompson:
> >> {quote:title=Uwe Raabe wrote:}{quote}
> >> Am 27.03.2010 14:12, schrieb Kristina Thompson:
> >>> I am not a programmer, I am a graphic designer and worked on some images for a program being written in Delphi (I am uncertain of the version).  The problem seems to be that no matter what size I create the image, Delphi distorts it and creates what appear to be "holes" in the image that are transparent and show the background color
> >>>
> >>> What can we do to fix this issue if anything?
> >>>
> >>> Any help would be greatly appreciated.
> >>
> >> Delphi (depending on the version) is able to draw a tranaparent image
> >> using a specific color to indicate these transparent pixels. Each pixel
> >> having this color will be drawn in the background color.
> >>
> >> Changing the TransparentColor property in Delphi might help here.
> >>
> >> If there is no specific transparent color given, Delphi tends to use the
> >> color of the lower left pixel for that.
> >
> > Thank you very much for your response.
> >
> >   wish I had a way to show you the image itself so you could see precisely what I mean but, I will pass that information on to the developer.  Will this also help with the distortion that is being created?
> 
> It depends on how the image is displayed with Delphi. For instance, the 
> TImage component has a property "Stretch" which, when true, will resize 
> the picture to the width and height of the TImage component disregarding 
> the width and height of the original image.
> 
> A little bit more information would be helpful.

Thank you and I understand about the information.  It is a tad difficult as I am the one that creates the graphics and the programmer puts them in....I know little to nothing about programming so the information I have to offer is limited.  I will however pass this information along to her and see if that helps at all....thank you so much for taking the time to help :)
0
Kristina
3/27/2010 1:55:04 PM
Am 27.03.2010 14:55, schrieb Kristina Thompson:
> Thank you and I understand about the information.  It is a tad difficult as I am the one that creates the graphics and the programmer puts them in....I know little to nothing about programming so the information I have to offer is limited.  I will however pass this information along to her and see if that helps at all....thank you so much for taking the time to help :)

You can upload the PNG in the "attachments" group where attachments are 
allowed. Nevertheless I have to know which component is supposed to 
display the image and which Delphi version is used.
0
Uwe
3/27/2010 2:07:37 PM
"Uwe Raabe" <uwe@uweraabe.de> wrote in message 
news:228102@forums.embarcadero.com...

> If there is no specific transparent color given, Delphi tends
> to use the color of the lower left pixel for that.

That only applies to bitmaps.

-- 
Remy Lebeau (TeamB)
0
Remy
3/29/2010 5:15:01 AM
Am 29.03.2010 07:15, schrieb Remy Lebeau (TeamB):
> "Uwe Raabe"<uwe@uweraabe.de>  wrote in message
> news:228102@forums.embarcadero.com...
>
>> If there is no specific transparent color given, Delphi tends
>> to use the color of the lower left pixel for that.
>
> That only applies to bitmaps.
>

Depending on the way the PNG is squeezed into Delphi it may be converted 
to a bitmap. Actually we are all blind guessing here.
0
Uwe
3/29/2010 7:35:37 AM
Reply:

Similar Artilces:

2D graphics for Delphi....
I have another graphics related problem, which is 2D rather than 3D, so I guess GLScene is not a candidate: Say I have a 2D array with XY coordinates and a scalar value in each point. These values vary in some continuous way across the whole XY surface (like barometric pressure across the earth), but the array only contain the (regular or irregular) sampling points. How would I go about color-coding the data so that there is a level map created with one color is designating one pressure range, possibly even with colors gradually changing across the area. Note that there are only so...

Problem with Delphi 6 to Delphi 7 upgrade
I have just purchased Delphi XE because I have an immediate need of D7 which came for free with XE. I downloaded and installed D7 and I think I applied the Update 1 that I had also downloaded. After much messing around with old components, I have finally attempted to compile my D6 project with D7. I get the following error:- [Fatal Error] apm.dpr(225): Unit ExtDlgs was compiled with a different version of ExtCtrls.TPanel I have checked the library paths all point to D7 versions of everything and now am at a loss to know what to do next. Also checked the sequence to make sure that al...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

3D graphics library for Delphi?
I am working on a scientific program which needs to visualize 3D body properties. It is supposed to show the properties of the ground after doing a set of measurements and inverting the results. So a block that can be twisted and turned and where the properties are color coded (semi-transparent) is what I am after. We (not myself though) have used GLScene for 2D visualization but for 3D it was done before using VTK and C++ code. But I want to use Delphi since I have 16 years of experience with Object Pascal and basically none with C++... So is it possible to render 3D data as colo...

3D graphics for Delphi in 2013?
Is it possible for Embarcadero to provide some near future prospects regarding 3D graphic capabilities for Delphi (not firemonkey)? By 3D I do not mean 3-D text or a little 3D triangle structure like the case with Firemonkey... I mean full 3D engine graphics capability usable in _Delphi for Windows PC applications_. To think: We are using fast computers with exciting graphics interface capability and it is _the worst supported aspect of Delphi_. Delphi is currently decades behind time in this regard...and I do not even mention the other standard PC peripherals like audio, mouse, keyboard ...

problems at displaying .png graphics
Name: nobody Product: Gran Paradiso Alpha 1 Summary: problems at displaying .png graphics Comments: There are problems at displaying .png graphics like in http://www.mozilla.org/projects/calendar/ There are only the outlines visible. Browser Details: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061204 GranParadiso/3.0a1 ...

Delphi 2006 to Delphi XE Crystal BPL problem [Edit]
I am in the process of migrating our application from Delphi 2006 to Delphi XE and, for ease of use, I have both 2006 and XE installed on my development computer. I access Crystal Reports XI RDC in our application and so I rebuilt the BPL in XE in order to add the new package to XE. However, when I try to add the package to XE I get the error message: “Registration procedure, Craxddrt_tbl.Register in the package c:\Documents and Settings\All Uers\Documents\RADS Studio\8.0\BPL\Crystal.bpl raised exception class EFilerError: Component TDatabase can’t be registered by package crystal.bpl be...

converting delphi 2007 code to delphi XE2 -- emptyparam problem
Hi, I am trying to convert my applicantion code from delphi 2007 to delphi XE2 and i got stuck in this error "[DCC Error] ADODB_TLB.pas(4888): E2033 Types of actual and formal var parameters must be identical". This happens when we use emptyparam as an argument in a function that wants an olevariant. Example: function TAcadDatabase.CopyObjects(Objects: OleVariant): OleVariant; begin Result := DefaultInterface.CopyObjects(Objects, EmptyParam, EmptyParam); //this is where we get the ERROR end; The coyobjects function as this signature: " function CopyObjects(Object...

problem delphi 2010 apps with a delphi 5 pro Pchar
Hallo I build on till now alle tools and programas with delphi 5 pro now i have delphi 2010 want don't want rewite alle my DLL Tools Like The tool i made for making PDF In case of This DLL i can't becose the vcl i use in delphi 5 will not work in delphi 2010 *This call in apps* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall external 'GUPPDF2.dll'; {code} *In delphi 5 DLL* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall; {code} if call the function i get a "Access violation" i think that the settings parameter empty is...

Built with and Powered by Delphi XE3 graphics
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --JivePart=_7ebf3.zeB8CwDOH5aMJzMl Content-Type: text/plain; charset="Utf-8" As requested in embarcadero.public.delphi.deployment --JivePart=_7ebf3.zeB8CwDOH5aMJzMl Content-Type: image/png; name="DelphiXE3_200x75.png" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="DelphiXE3_200x75.png" iVBORw0KGgoAAAANSUhEUgAAAMgAAABLCAYAAAA1fMjoAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ bWFnZVJlYWR5ccllP...

Big problems concerning PNG graphics
Hi, while drawing a PNGImage to a printer canvas, the transparency of the png graphic is always black! Tested with pdfcreator and hp laserjet p3005n. You can try it yourself by adding a TImage to a Form and setting the Picture to a png graphic. Then put a button to the form with the following lines of code: Printer.BeginDoc; Printer.Canvas.Brush.Color := clSkyBlue; Printer.Canvas.Rectangle(0,0, 500,500); Printer.Canvas.Draw(0,100, (Image1.Picture.Graphic as TPngImage)); Printer.EndDoc; So my question, is this a pngimage bug or am i doing something wrong? greets ...

Problems
Hi; We have a software developed in the Delphi 2009 and we do NOT use the runtime themes. So, the option: Projetct / Options / Application / Enable Runtime Themes is UNCHECKED. When I'm on the Delphi 2009, it's all right. The problem is when I use the Delphi 2010. The same configuration (Projetct / Options / Application / Enable Runtime Themes is UNCHECKED). The form editor (IDE) insists on show the forms with the current Windows theme. I don't like this, I want the runtime themes off while I'm programming and editing my forms. How can I solve it? Thanks to...

Problem upgrading web service client from Delphi 7 to Delphi XE
In trying to upgrade our web service client to Delphi XE we have now get a web service error of Invalid Format. When we examine the SOAP request we see the following differences from Delphi 7 vs Delphi XE In Delphi 7 we get <SomeStuff xmlns="" xsi:nil="true" /> In Delphi XE we get <SomeStuff xsi:nil="true" /> We have narrowed the failure down to these differences in the client request. Is there anyway to get Delphi XE to generate a SOAP request with the xmlns attribute set to blank as it used to be? Hello, > In trying to u...

Upgrade from Delphi 5 and Delphi XE: Variant and SysUtils unit problems.
Hi. I am a newbie to Delhi XE. I have just taken on the task of converting my stuff from Delphi 5 [sic] to Delphi XE. The first errors I got was "Variants unit out of data or corrupted" and "symbol deprecated" in SysUtils I hope I can fix the problem by simply pointing to the "up-to-date" units. I am also wondering wether I will not have to switch to Unicode, since the errors seem to be string related (not that I know what changing to Unicode entails). Any help? Marcus > {quote:title=Marcus de Bruin wrote:}{quote} > Hi. > > I...

Web resources about - Problem with PNG graphics in Delphi - embarcadero.delphi.graphics


Graphics Interchange Format - Wikipedia, the free encyclopedia
The Graphics Interchange Format ( GIF ; / ˈ dʒ ɪ f / or / ˈ ɡ ɪ f / ) is a bitmap image format that was introduced by CompuServe in 1987 and ...

Adobe Post debuts on iPhone, lets anyone create memorable graphics on-the-go
... with visuals and Slate lets anyone create magazine-quality stories from iPad, Adobe Post makes creating good-looking, sharable graphics from ...

Why 60 Minutes Chose to Show Graphic Footage of Sarin Attack
Not only is Scott Pelley ‘s 60 Minutes report on a deadly sarin attack in Syria being honored with a duPont Award , a digital-only feature about ...

Create great social graphics on the go with Adobe Post
Social graphics, those pictures you see on Facebook and Twitter with text, are a great way to spread the word about sales and other promotions. ...

This Christmas Eve, get Xara Photo & Graphic Designer 9, worth $89.99, for FREE at Downloadcrew Giveaway ...
Now this is a real doozy a $90 graphical powerhouse for nothing! Xara Photo & Graphic Designer 9 covers all your design needs, from photo editor ...

Design like a pro with this graphic drawing tablet, just $45 on Amazon
With a graphic drawing tablet you will be able to edit your digital photos, make professional quality drawings and more. The Huion 8" x 5" Graphic ...

Samsung Wins First Round in Graphics Patent Case Nvidia
A U.S. trade judge said Nvidia Corp. infringed Samsung Electronics Co. patents, offering another win for the Korean gear-maker in a running legal ...

AMD was so angry at Geralt's hair, it made an open-source graphics API for developers
Nvidia’s GameWorks is a widely used toolkit that allows developers to add fancy visual effects to their game and cool physics simulations to ...

High-end Nvidia graphics cards suffer shortages and see increased pricing
Strong demand for high-end graphics cards especially from China has caused some of Nvidia's graphics cards to suffer from shortages, which has ...

Adobe's new app adds text and graphics to your social posts
To help the less design savvy create graphics for their social posts, Adobe has a new app that's driven by so-called Design Filters. The app ...

Resources last updated: 12/28/2015 2:57:46 PM