Questions tagged [jpeg]

JPEG is a common lossy compression method for digital images. Use this tag for questions about JPEG images using the image/jpeg MIME type.

JPEG is a common lossy compression method for digital images. Use this tag for questions about JPEG images using the image/jpeg MIME type.

See also , , and for other image file formats with JPEG in the name.

More information at the JPEG Wikipedia page.

4926 questions
56
votes
7 answers

Is there a way to tell browsers to honor the jpeg exif orientation?

I know that the automatic rotation of JPG files is disabled in browsers. They can not enable it because it would break the layout of some websites. Is there a CSS property? or javascript code to achieve that? or something else? or maybe the solution…
Marc MAURICE
  • 1,571
  • 1
  • 11
  • 9
54
votes
1 answer

CLI command to convert Webp image(s) to JPG?

How do I convert webp files to JPG format?
lmlmlm
  • 699
  • 1
  • 5
  • 7
54
votes
4 answers

Why does IE7 specify a mime-type of image/pjpeg rather than just image/jpeg?

When uploading a file (jpeg) via a form in IE7 I am seeing a mime-type of "image/pjpeg" instead of "image/jpeg" (as I see in Firefox or similar). It's easy enough to work around this problem, but I'm just wondering why IE7 is behaving differently…
John Montgomery
  • 8,868
  • 4
  • 33
  • 43
51
votes
5 answers

Converting a PDF to a series of images with Python

I'm attempting to use Python to convert a multi-page PDF into a series of JPEGs. I can split the PDF up into individual pages easily enough with available tools, but I haven't been able to find anything that can covert PDFs to images. PIL does not…
Jaearess
  • 677
  • 1
  • 7
  • 10
50
votes
6 answers

Unable to read JPEG image using ImageIO.read(File file)

I'm having problems reading this one JPEG file using ImageIO.read(File file) - it throws an exception with the message "Unsupported Image Type". I have tried other JPEG images, and they seem to work fine. The only differance I've been able to spot…
Malakim
  • 1,333
  • 2
  • 18
  • 34
49
votes
2 answers

Convert pdf to jpeg using a free c# solution

I need to convert a pdf file into a jpeg using C#. And the solution (library) has to be free. I have searched a lot of information but seems that I don't get anything clear. I already tried itextsharp and pdfbox (but this, the pdf2image is only for…
FrioneL
  • 943
  • 2
  • 13
  • 19
49
votes
15 answers

How do you create a thumbnail image out of a JPEG in Java?

Can someone please help with some code for creating a thumbnail for a JPEG in Java. I'm new at this, so a step by step explanation would be appreciated.
mmmmr
48
votes
8 answers

Save inline SVG as JPEG/PNG/SVG

I have an inline SVG in my html, and I need to be able to save this as either a JPEG, PNG or SVG. I have tried a few different methods with converting the SVG to canvas and then converting to JPEG, but I haven't been able to get these working. Here…
Tim Rideyourbike
  • 667
  • 1
  • 6
  • 14
47
votes
6 answers

How to create an animated GIF from JPEGs in Android (development)

I am looking for a simple way to create an animated GIF in a native Android application. The source files should be JPEG (from camera or what ever) and the output should be saved as GIF on the device. I do not want to know how to play animations or…
Mischa
  • 1,073
  • 2
  • 13
  • 23
47
votes
4 answers

How to set the image quality while converting a canvas with the "toDataURL" method?

I want to set the quality factor when I encode a canvas element to jpg. var data = myCanvas.toDataURL( "image/jpeg" ); It does not give me a quality option. Is there an alternative library I can use? Related: what is the default quality setting…
jedierikb
  • 12,752
  • 22
  • 95
  • 166
42
votes
7 answers

matplotlib savefig in jpeg format

I am using matplotlib (within pylab) to display figures. And I want to save them in .jpg format. When I simply use the savefig command with jpg extension this returns : ValueError: Format "jpg" is not supported. Supported formats: emf, eps, pdf,…
cedm34
  • 493
  • 1
  • 5
  • 5
42
votes
1 answer

C# read a JPEG from file and store as an Image

How can I read a JPEG on my filesystem and store it as a System.Drawing.Image within my C# code?
TK.
  • 46,577
  • 46
  • 119
  • 147
39
votes
2 answers

Does PNG support metadata fields like Author, Camera Model, etc?

When I click on the image>property>details of a PNG image in Windows many fields are missing compared to a JPEG file. Are these fields supported in PNG? If so, how would they be added in a PNG file programmatically?
techno
  • 6,100
  • 16
  • 86
  • 192
39
votes
6 answers

High quality JPEG compression with c#

I am using C# and want to save images using JPEG format. However .NET reduces quality of the images and saves them with compression that is not enough. I want to save files with their original quality and size. I am using the following code but…
Baran
  • 1,388
  • 6
  • 16
  • 33
38
votes
7 answers

What is the smallest valid jpeg file size (in bytes)

I'd like to screen some jpegs for validity before I send them across the network for more extensive inspection. It is easy enough to check for a valid header and footer, but what is the smallest size (in bytes) a valid jpeg could be?
twk
  • 16,760
  • 23
  • 73
  • 97