Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best image format for upload?

Status
Not open for further replies.

alec_t

Well-Known Member
Most Helpful Member
The recent sticky about screenshots recommends saving them as JPGs. But elsewhere on the forum it has been pointed out that JPGs of schematics result in fuzzy images, so GIFs or PNGs are preferred. What's the concensus on this?
 
Thank you for your feedback, I will update the Screenshot post with this information as well.

The image formats JPGs, GIFs and PNGs are all recommended. These types of image are compatible on all computers without any additional software, and 99% of browsers support them (PNGs sometimes don't work on very old browsers). They also use significantly less space than other image types therefore quick to download.

They do slightly differ from one another, here are the pros and cons:
- JPGs are best when the image has a lot of gradients and shading (digital cameras always use JPGs)
- GIFs are best when the image has a lot of text and straight lines (like schematics)
- PNGs are a new format that surpass the quality of GIFs but are not compatible in very old browsers.

PS: I'm working on a beginners guide like you mentioned in another thread :)

Regards,
EM
 
JPGs make line sfuzzy when you set the quality low. For example, when I save an image in GIMP, I keep it at 80% or above (usually 100% if its under 200KB). If you set it for 60, or say 40%, you will get lots of fuzzies. :D
 
I would completely disagree with EM here (as would many members), DON'T use JPG for screen shots, use PNG or GIF, they are both much higher quality and both produce smaller file sizes.

Use JPG for photos and scans.
 
I agree, jpg images cannot be enlarged to see details.
 
Comments welcomed.
Democracy in action! :) I approve the changes, EM (not that you need my approval!)
 
Given a choice for a simple schematic the .gif file format would be my choice. However, for screen shots I would choose the .png file format over the .gif. The reasoning is that depending on the screen shot the .gif file format only supports 256 colors while the .png format supports about 16 million (true color) colors. When I upload an image or create an image for upload I try to choose the best file format based on the image. I also try to size the image for best viewing so things are well enough defined. Obviously when creating a .png and .gif image of the same shot the .png file size will be larger.

The main problem with .jpg files is as noted they do not enlarge well from their original size. Thus a small image lacking detail when enlarged looks like a pixelated mess.

Overall my opinion is to use the best suited image file type based on the image. The majority of what I upload is .gif or .png.

Just My Take
Ron
 
Many people post a schematic made with a Simulation program that draws pastel lines and text (instead of black) that is hard to see. Frequently it is covered in chicken-pox dots.
 
Hello there,


I use JPG's, GIF's, and BMP's on my computer. I have very specific reasons for using these three mostly. Here is some reasoning behind this choice.

BMP:
I use the BMP format when i have to have a 16 million color picture with no loss of image quality, usually when i know i'll probably have to modify it later. I dont upload BMP's however, because they are way too large. A picture stored in 24 bit color BMP format takes up a lot of room, and a 32 bit color BMP makes the biggest file you'll see so it's not good for uploading. If the BMP has 256 colors or less i convert it to GIF and store it that way.

GIF:
This format is especially useful for schematics and other line drawings. It makes for a small file size so it's very good to upload and store and since the image is lossless too you can edit it as many times as you want too without loosing image quality. It's only 256 bit normally, but that's good enough for every schematic i've ever seen as well as other technical documents like mechanical parts outlines.
A rather strange drawback with this format can occur if the software used to create the file, well, isnt all that good. Some programs like MSPaint uses a poor color translation algorithm that can render the picture all dotted up with the dots forming little patterns that distract from the picture. The solution is to use a better program, but a workaround is to make sure that the picture you want to save as .gif has only 256 colors or less. This trick usually keeps the picture clear of the 'chicken pox' audioguru was talking about.

JPG:
This format (used with an adequate compression setting) is good for real life still photos, like pictures of people and landscapes and just general photography where you use a digital camera or scanner to produce the image. It's a lossy format, meaning that the image quality suffers somewhat, but it usually doesnt matter when used with real life photo shots, and it makes the best color photo per byte of file space. It's only good for schematics when the schematic was taken with a camera or scanner, and not as good as GIF when the schematic was hand draw with straight lines on the computer using a line drawing program.

When to use each format? To choose the proper format you have to not only know the picture content, but where the picture originated (camera, scanner, drawn with a program, etc.).

BMP:
Only when you store it on your own computer and you need 16 million colors and you might have to alter it several times.
You can convert to GIF if there are 256 colors or less unless you have good enough software to convert more colors without introducing artifacts.

The GIF and JPG types require you to make a decision about the picture content and how it was produced. GIF is the best for schematics, but it's best when the schematic originated in a line drawing program and stored to GIF format. For some schematics taken with a digital camera it may be better to use JPG because of the way the shades of gray (or color) change throughout the picture. With the right software, you can convert a photo of a schematic to .gif and it will look nice, but in other cases you'll have to use JPG. If you're not sure you probably have to use JPG if it's a photo, but if it was drawn on the computer or downloaded as another format but it's still mostly lines and blocks then GIF is probably better. If any of the lines in the photo are not perfectly horizontal or vertical or diagonal then JPG may look better than GIF.

I should probably post some examples of when each format, GIF or JPG, is better because it's very hard to describe how this works.
 
Last edited:
BMP:
I use the BMP format when i have to have a 16 million color picture with no loss of image quality, usually when i know i'll probably have to modify it later. I dont upload BMP's however, because they are way too large. A picture stored in 24 bit color BMP format takes up a lot of room, and a 32 bit color BMP makes the biggest file you'll see so it's not good for uploading.
That's why a PNG file is so convinient. It has the same advantages (include alpha channel) but has a size that is just a fraction compared to BMP.

I assume you use ms paint. Well, I use Inkscape, and I strongly recomend users of mspaint to leave that and using a vector based program. There is many things to learn, but it will pay off
 
Hi Grossel,

Yes, png is another interesting format. I havent used it much in the past but i might start using it more because it started to become more popular.

I forgot to mention that i like BMP also because it can be easily read with a program you write in C or another language.

I'll also try the editor you mentioned and see if i like it.
 
I would completely disagree with EM here (as would many members), DON'T use JPG for screen shots, use PNG or GIF, they are both much higher quality and both produce smaller file sizes.

Use JPG for photos and scans.

I totally second that emotion.

GIFs are the best for simple illustrations; I use them for my schematic drawings, which are 16-color grayscale images. They're compact, easy to produce (so long as you're not using such a primitive tool as Windows Paint--eccch!), and are readable by most everyone in the world (web browsers, picture editors, etc.). And don't make them any more colors than necessary. You can make a 65K color GIF but it'll be HUUUUUGE.

And please don't even think about using BMPs. That file format ought to be taken out back and shot. It's got no legitimate reason to exist anymore, apart from a very few legacy programs and, well, Micro$oft.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top