Best format for pictures?

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
J13
Regular
Posts: 60
Joined: Wed Jan 24, 2007 3:28 am
Location: Cambridge
Contact:

Best format for pictures?

#1 Post by J13 »

I was just hoping to find out about this now rather then have to convert all images i want to use later.
Basically i'm looking for 2 things, the first being the best image format to use (Jpeg, png, bmp etc) which ren'py supports, allows transparency and has a good image quality to size ratio.
The second is the best format to use for smaller and/or less detailed images, also supported by Ren'py, in this case it doesn't need to allow transparency nor does the image quality to size ratio have to be great, i'm juts looking to keep the image file small with this.
For what i've done so far i've used .png and while the file sizes are thankfully relatively small i'd still like to get them smaller if at all possible.
Any help would be appreciated as i simply don't know what to look for witht his sort of thing.

chisa-chan
Regular
Posts: 197
Joined: Fri Nov 10, 2006 3:25 am
Location: at a village near Bandung, Indonesia
Contact:

#2 Post by chisa-chan »

JPEG and BMP is good, but seems it needs alpha-layer mask to allow transparency. Not sure if Ren'Py supports this, though.

If you want your image to appear in alpha / transparent in Ren'Py, use PNG format (set the background to transparent)

Ara, JPEG can be kept small. Set the image quality around 7 (medium), it won't look so different with the high quality ^^
Kalau tidak suka ya jangan diladeni, gitu aja kok repot™.
Cynanthia's Blog (Indonesian)

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#3 Post by monele »

Just confirming : PNG for transparency and lossless quality, JPG for anything else.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#4 Post by Jake »

Also: PNG can do significantly better filesize-wise than JPEG if you have a lot of flat colour in an image, but it doesn't cope so well with gradients. So if your BGs (for example) are simple, it's worth checking if they're smaller as PNGs.

Also also: even at high quality levels, JPEG makes a terrible job of high-contrast areas, like the edges of hard lines and text, so if you have a lot of those in your image it's sometimes wiser to use PNG anyway.

I can't think of any reason you'd ever want to use straight-up BMPs for anything, though. ;-)
Server error: user 'Jake' not found

J13
Regular
Posts: 60
Joined: Wed Jan 24, 2007 3:28 am
Location: Cambridge
Contact:

#5 Post by J13 »

Well i tried converting a bunch of images to .jpg and it was just as you wrote, single color (or near enough) images tended to either gain size or only be slightly smaller. But with multicolored images, converting to .jpg seems to have reduced the size by about a 1/5th without a noticable loss in quality.
Either way i'm happy :) so thankyou for the info/advice.

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#6 Post by DaFool »

jpg backgrounds / full-screen images
png sprites / overlays with transparencies

chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

#7 Post by chronoluminaire »

DaFool wrote:jpg backgrounds / full-screen images
png sprites / overlays with transparencies
I wouldn't say it's quite that. It's not based on resolution per se, but image content:

PNG for things with transparency, large blocks of the same colour, or things with high-contrast edges (like text) that you don't want to blur... basically almost everything except photos
JPG for cases where the above don't apply: principally photos.
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!

User avatar
rioka
Royal Manga Tutor
Posts: 1255
Joined: Fri Jul 16, 2004 12:21 pm
Completed: Amgine Park, Garden Society: Kykuit, Metropolitan Blues (art)
Location: somewhere in NY
Contact:

#8 Post by rioka »

I'm with the jpg - backgrounds; png - transparencies crowd too.

...Though I have used gif on some background images to cut down on file size. Does that make me a traitor now? D:

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#9 Post by PyTom »

No, although I'd be surprised if you found a case where a GIF is superior to an 8-bit PNG in file size, when the PNG has been saved with level 9 compression, and optimized using a tool like pngcrush.

(I mean, genuinely surprised... although I haven't studied it in much detail, PNG is the newer format, and should generally have better compression than GIF, when both represent 8-bit images.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users