Recent

Author Topic: How can I save TImage.PNG with transparent background?  (Read 6846 times)

Bananbl4

  • Newbie
  • Posts: 3
  • Your trusted friend in science
How can I save TImage.PNG with transparent background?
« on: February 08, 2011, 12:05:07 pm »
When I set transparent color to image, it saves with color of form on background.
So is my question := how can I save png with transparent color?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: How can I save TImage.PNG with transparent background?
« Reply #1 on: February 09, 2011, 12:33:24 am »
The transparency of t a mask isn't passed as alpha channel to the PNG
iirc a rawimage has ways to convert a mask into an alpha channel.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Bananbl4

  • Newbie
  • Posts: 3
  • Your trusted friend in science
Re: How can I save TImage.PNG with transparent background?
« Reply #2 on: February 25, 2011, 01:25:46 pm »
And, how can i load png file with background color and convert that color to a transparency mask.
I am really dunno...

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: How can I save TImage.PNG with transparent background?
« Reply #3 on: February 25, 2011, 04:56:38 pm »
Do you mean that there are opaque pixels and one transparent color, or do you mean that there are levels of opacity?
Conscience is the debugger of the mind

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: How can I save TImage.PNG with transparent background?
« Reply #4 on: February 26, 2011, 07:46:13 pm »
And, how can i load png file with background color and convert that color to a transparency mask.
I am really dunno...

Set Masked := true and Set the MaskColor to the color you want to be masked
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018