Questions tagged [jpeg]

JPEG is a commonly used method of lossy compression for digital photography (image).

The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality.

JPEG compression is used in a number of image file formats. JPEG/Exif is the most common image format used by digital cameras and other photographic image capture devices; along with JPEG/JFIF, it is the most common format for storing and transmitting photographic images on the World Wide Web.[citation needed] These format variations are often not distinguished, and are simply called JPEG.

The term "JPEG" is an acronym for the Joint Photographic Experts Group which created the standard. The MIME media type for JPEG is image/jpeg (defined in RFC 1341), except in Internet Explorer, which provides a MIME type of image/pjpeg when uploading JPEG images.

More information at Wikipedia page of JPEG

4653 questions
591
votes
13 answers

What are the different usecases of PNG vs. GIF vs. JPEG vs. SVG?

When should certain image file types be used when building websites or interfaces, etc? What are their points of strength and weakness? I know that PNG & GIF are lossless, while JPEG is lossy. But what is the main difference between PNG & GIF? Why…
Faruz
  • 9,691
  • 10
  • 44
  • 65
304
votes
15 answers

Python Image Library fails with message "decoder JPEG not available" - PIL

PIL does support JPEG in my system. Whenever I do an upload, my code is failing with: File "PIL/Image.py", line 375, in _getdecoder raise IOError("decoder %s not available" % decoder_name) IOError: decoder jpeg not available How can I resolve…
Ravi
  • 2,432
  • 3
  • 15
  • 25
275
votes
6 answers

JPG vs. JPEG image formats

I often use JPEG images, and I have noticed that there are two very similar file extensions: .jpg, which my mobile's camera and the Preview application use, and .jpeg, with which Image Capture saves the images from scanning with my Canon MX455…
MickG
  • 3,086
  • 2
  • 12
  • 20
156
votes
11 answers

Changing all files' extensions in a folder with one command on Windows

How can I use the Windows command line to change the extensions of thousands of files to *****.jpg?
Berker Yüceer
  • 6,276
  • 17
  • 61
  • 99
144
votes
10 answers

How to remove EXIF data without recompressing the JPEG?

I want to remove the EXIF information (including thumbnail, metadata, camera info... everything!) from JPEG files, but I don't want to recompress it, as recompressing the JPEG will degrade the quality, as well as usually increasing the file…
Denilson Sá Maia
  • 40,640
  • 31
  • 100
  • 109
130
votes
8 answers

Accessing JPEG EXIF rotation data in JavaScript on the client side

I'd like to rotate photos based on their original rotation, as set by the camera in JPEG EXIF image data. The trick is that all this should happen in the browser, using JavaScript and . How could JavaScript access JPEG, a local file API…
Mikko Ohtamaa
  • 69,174
  • 40
  • 208
  • 346
115
votes
14 answers

Tools for JPEG optimization?

Do you know of any tools (preferrably command-line) to automatically and losslessly optimize JPEGs that I could integrate into our build environment? For PNGs I'm currently using PNGOUT, and it generally saves around 40% bandwidth/image size. At the…
chris166
  • 4,735
  • 4
  • 22
  • 25
115
votes
8 answers

Convert SVG image to PNG with PHP

I'm working on a web project that involves a dynamically generated map of the US coloring different states based on a set of data. This SVG file gives me a good blank map of the US and is very easy to change the color of each state. The…
Michael Berkompas
  • 2,552
  • 3
  • 17
  • 22
113
votes
7 answers

Convert RGBA PNG to RGB with PIL

I'm using PIL to convert a transparent PNG image uploaded with Django to a JPG file. The output looks broken. Source file Code Image.open(object.logo.path).save('/tmp/output.jpg',…
Danilo Bargen
  • 15,862
  • 15
  • 79
  • 111
108
votes
6 answers

Does PNG contain EXIF data like JPG?

I was wondering if PNG contains data like the following? What I did was to convert the jpg file to png format, and I was expecting to retrieve the same info I had on the jpg as below: Currently using this as3 library to read the data. IDF0--- IDF…
user1004413
  • 2,239
  • 6
  • 17
  • 30
98
votes
8 answers

When to use PNG or JPG in iPhone development?

I have an app that will display a bunch of images in a slideshow. Those images will be part of the bundle, thus distributed with the app. All the images are photographs or photographic, etc. I've read that it's preferred to use PNG as the image…
Maverick
  • 1,659
  • 2
  • 16
  • 19
90
votes
7 answers

Why am I getting the error: "Not a JPEG file: starts with 0x89 0x50"

Why am I getting the message "Not a JPEG file: starts with 0x89 0x50" when I try to open my jpg file?
matt burns
  • 22,440
  • 9
  • 91
  • 102
84
votes
9 answers

Efficient JPEG Image Resizing in PHP

What's the most efficient way to resize large images in PHP? I'm currently using the GD function imagecopyresampled to take high resolution images, and cleanly resize them down to a size for web viewing (roughly 700 pixels wide by 700 pixels…
maxsilver
  • 4,184
  • 4
  • 24
  • 23
79
votes
11 answers

Is it possible to tell the quality level of a JPEG?

This is really a two part question, since I don't fully understand how these things work just yet: My situation: I'm writing a web app which lets the user upload an image. My app then resizes to something displayable (eg: 640x480-ish) and saves the…
nickf
  • 499,078
  • 194
  • 614
  • 709
78
votes
6 answers

When to interlace an image?

As a general rule of thumb when is it appropriate to make a gif interlaced, a png interlaced and a jpeg progressive? Especially when publishing the image on the web.
Timo Huovinen
  • 46,329
  • 33
  • 128
  • 127
1
2 3
99 100