image file formats in V3
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Technetium

Just wondering which file formats will be usable in V3. From examining the various demos and games, I see that GIF, PCX, and JPG all work. Any others?

If PNG is allowed, will images with pixel-specific alpha information work? If not, do we still use the old (255,0,255) color as the translucent color?

I noticed that there is an AlphaBlit function, which would lead me to think that the answer to my question about PNGs is no. It's also interesting to find that the alphablit for Verge 3 looks like it functions exactly like the one I wrote for Verge 2 in VC (though it is probably much faster being hard-coded and all).

I'm ready to get started working on graphics, just gotta get some of this stuff figured out first. :-)

Posted on 2004-02-20 22:06:47

mcgrue

png is available. I think bmp is too.

However, alpha information is not available.

However, there is an alpha blitter. But it doesn't use the alpha channel of PNG. It uses any alpha-mask image you feed it (IE: a greyscale image)

Posted on 2004-02-20 22:30:22

vecna

V3 uses corona for image loading, so it supports everything Corona does, which is a lot. Although I think I need to update my version of corona, cause Im wondering if there might be some bugs in mine. Its pretty old.

[.. Sonnuva bitch. Damn HTML post eating.]

For (less than) 256color images I generally prefer GIF, but PNG is your best bet for hicolor images. I DONT recommend JPG for hicolor images because the artifacts of lossy compression are much more apparent in lower resolutions.

But no, we dont load the alpha channel directly from PNGs. The alphamap used for AlphaBlit() is a separate image so that the entire V3 Graphics API can be used to manipulate it; dynamic alpha effects are alot more exciting to me as a feature than static alpha on an image.

Alpha aside, yeah you'd want to use 255,0,255 for normal transparency.

Posted on 2004-02-20 23:08:18 (last edited on 2004-02-20 23:12:10)

TomT64

Please explain how AlphaBlit works, i.e. you input srcimage and alphaimg. What is the alpha image, and what is the best way to make one? Can it be dynamically created off PNG alpha? If not, would this feature be useful?

Posted on 2004-02-20 23:55:27

Technetium

Holy crap it does work exactly like my V2 alphablit. O_O

Tom, you create the file separately. It's extra work, but it is key to getting some really sweet effects (for example, you could use it to make sprites anti-alias with backgrounds).

If you want to grab it from a PNG's alpha channel, I think I know how to do this in Photoshop. You should save first, then merge all the layers except the background layer. Click "preserve transparency" on that layer, and fill with white (is it white or black that is 100% solid?). Fill the background layer the opposite color. Save as whatever you want your alphaimg to be.

Is there any noticeable speed difference between V3's alphablit and its regular image blitting function?

Posted on 2004-02-21 00:36:55

Toen

zeromus is talking about adding a way to grab an alphamap from a png. That'd give you quick and easy results.

Posted on 2004-02-21 01:01:03

Tatzen

It can write PNG and TGA files, and read PNG, JPEG, PCX, BMP, TGA, and GIF.

From corona.sf.net.

Posted on 2004-02-21 06:19:26

andy

Maybe a function that returns a grayscale image containing the alpha channel of an image is in order.

Posted on 2004-02-21 07:47:05

Tatzen

yeah agreed. I've already mentioned this to vec.

Posted on 2004-02-21 07:53:53

TomT64

Me likey this idea. I experiment with making my own tonight I hope.

Posted on 2004-02-21 08:03:43

Tatzen

Not really possible using V3. V3 will most likely discard the image alpha channel, and even if it did keep it, you wouldn't have access to that data.

Posted on 2004-02-21 08:08:50


Displaying 1-11 of 11 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.