The Daily Click ::. Forums ::. Klik Coding Help ::. How I can capture images with alpha (transparency) and save it in PNG? [MMF2 Dev]
 

Post Reply  Post Oekaki 
 

Posted By Message

Sergiocarp



Registered
  24/05/2009
Points
  294
15th July, 2011 at 21:29:23 -

Hi everyone!

Some time ago I have this question and I have not been able to solve it, so I am writing to you hoping that can help me with my problem.

I tell them what i want to do: :

I am making an application for make games covers, but I've only been successful in capturing the image in formats that do not have transparency as ".Bmp" and I need to save them to ".Png" with transparency.

Example:

Image
Image
(i'm use "Screen Capture object" to capture images)

So I would be very grateful if someone can give me a solution.

If someone can make me an example in ".mfa", this would be much better for me, because my primary language is not English, so to me it would be easier to see an example.


Thanks for the help and excuse my english.



Edited by Sergiocarp

 
__________________________________

www.mmfzone.com (para miembros que hablen espaņol)*(for spanish members)

Sergiocarp



Registered
  24/05/2009
Points
  294
18th July, 2011 at 05:06:08 -

Is this impossible?

 
__________________________________

www.mmfzone.com (para miembros que hablen espaņol)*(for spanish members)

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2722
20th July, 2011 at 10:26:27 -

How will you capture transparency from your screen?

You're basically grabbing a copy from a buffer of pixels and those pixels have a default colour of ... say black and probably all pixels will be set during a game with some kind of colour and if not, the colour is black not transparent.

You can only capture the effects from alpha channels (those anti-aliasing edges around icons, you're shine-through title bar or something else) and transparency. So that will give you either the picture which is behind the other picture or it's produced pixels from alpha blending.

I am not familiar with the "Screen Capture object", but perhaps there is an option to set a colour which can act as a transparent pixel. I tend to use purple or pink for this purpose, because I don't use that colour very often in games. And maybe there is an even better option, something like: use the background colour as transparent ... But as I said, I don't know of any options.

 
Image jenswa.neocities.org
   

Post Reply



 



Advertisement

Worth A Click