Recommended File Format for Graphics

Started by MiteWiseacreLives!, Thu 23/05/2013 07:00:26

Previous topic - Next topic

MiteWiseacreLives!

Started a bunch of new character stuff in the JPEG format, because in some recess of my mind I thought someone posted that it was best for AGS. Looking around the forum it seems that JPEG is junk.. what is the favourite format?

Mehrdad

My official site: http://www.pershaland.com/

Snarky

Anything but JPEG, really. It depends on what you need (and what color depth you're using). If you're going to be using transparency, then PNG. If your workflow produces a direct animation sequence, GIF has some benefits. Other formats are possible, but don't really offer any benefits.

The problem with JPEG is that it's a lossy compression format: it introduces artifacts (noise, essentially) into your images by actually changing the colors of some of the pixels slightly. That's not so bad when it comes to photos, but with pixel art in particular it can often ruin the graphics. Even worse, the errors add up every time you edit the picture, so even if it looks OK at first, it will get worse and worse each time you have to update it. Also, because of this noise, you can't make the background color of a sprite transparent, because even though it looks like it's all pink (or whatever), it's actually a bunch of slightly different shades of pink.

Finally, it's often a good idea to store your graphics in the file format of your image editor (e.g. for Photoshop, PSD), which preserves layers, animation frames and other effects, and just export a copy to the file format you're going to give to AGS. That can make it easier to edit things later (though again, that depends on how you work).

Khris

And you can put sprites into AGS by importing the Clipboard contents, which makes the intermediary file superfluous.

san.daniele

Quote from: Khris on Thu 23/05/2013 11:33:24
And you can put sprites into AGS by importing the Clipboard contents, which makes the intermediary file superfluous.

w00t?!!!
never saw that!
one more reason for me to get a simple win-laptop. I'm working on OSX using parallels to run windows, and AGS doesn't seem to recognize the clipboard when I switch between osx/win (kinda strange, as other win-programs do).

Khris

This will only work for 16 or 32 bit games, afaik.
But you could do a quick test using Paint in Windows.

Crimson Wizard

Quote from: Khris on Thu 23/05/2013 11:33:24
And you can put sprites into AGS by importing the Clipboard contents, which makes the intermediary file superfluous.
I think that won't let to copy all layers at once? Unless I am unaware of "flattening" copy operation in Photoshop and similar programs.

san.daniele

Quote from: Khris on Thu 23/05/2013 13:27:36
This will only work for 16 or 32 bit games, afaik.
But you could do a quick test using Paint in Windows.

that was the first thing I did after reading about it :)

Khris

So does it work now? You should see the option when you right-click an empty area in the sprite manager.

CW:
Sure, if your objects are made of several layers, you have to merge them before copying the sprite to the clipboard. But you'd do the same thing in order to save them as png file.
I also vaguely remember having had problems with this method in earlier versions of AGS, so I always copied the objects layer to a new document and flattened it first. But that issue seems to have been fixed at some point; selecting a layer with transparency and copy pasting stuff to AGS works just fine afaik.

MiteWiseacreLives!

Thanks, too bad I didn't ask this question earlier.. suffered from all those artifact and transparency problems you describe.  I will use the default format from now on, then when satisfied save as PNG(?). (BMP's which I used previously use excessive memory, correct?)

Crimson Wizard

Quote from: MiteWiseacreLives! on Thu 23/05/2013 15:31:32BMP's which I used previously use excessive memory, correct?
AGS stores imported sprites as decompressed bitmaps anyway, so the format will affect only size of your source images.

san.daniele

Quote from: Khris on Thu 23/05/2013 13:38:59
So does it work now? You should see the option when you right-click an empty area in the sprite manager.

it works just fine. I was just mentioning the fact that AGS doesn't seem to recognize graphics in the clipboard if I copy them on osx and then try to use them in AGS on parallels/windows. other win programs I tried had no problems recognizing the same clipboard (so in theory it works if I paste it into a random graphic-prog and then copy it again from there to use it in AGS).

AGS does recognize text in the clipboard though.

Ryan Timothy B

Quote from: Khris on Thu 23/05/2013 13:38:59
But that issue seems to have been fixed at some point; selecting a layer with transparency and copy pasting stuff to AGS works just fine afaik.
You sure? I believe copying images with transparency is a fault with the clipboard - but I haven't a clue. I know even copying an alpha channel image from the browser and pasting in photoshop, the transparency doesn't even work (unless there's another step I'm missing). It comes up as black.

Ali

Quote from: Crimson Wizard on Thu 23/05/2013 13:31:54
I think that won't let to copy all layers at once? Unless I am unaware of "flattening" copy operation in Photoshop and similar programs.
Ctrl-Shift-C copies flattened layers. Annoyingly, it doesn't work if there's just a background and no layers.

Khris

Quote from: Ryan Timothy on Thu 23/05/2013 16:53:46You sure? I believe copying images with transparency is a fault with the clipboard - but I haven't a clue.
I tested it with simple (as opposed to alpha) transparency in PSP7. Works fine; transparent areas end up white in the preview though, so the sprite can't contain any 255,255,255 pixels.
I guess it depends on the program though, PS might work differently.

Eric

Quote from: Ali on Thu 23/05/2013 17:14:28Annoyingly, it doesn't work if there's just a background and no layers.

Thank you for making me feel like I'm not the only one who goes crazy over this.

selmiak


SMF spam blocked by CleanTalk