The command-line program jpegtran provides several features for reformatting and recoding the representation of the DCT coefficients, for transformation of actual image data and for discarding auxiliary data in JPEG files, respectively.
Questions tagged [jpegtran]
20 questions
20
votes
1 answer
jpegoptim vs jpegtran vs mozjpeg
I found two slightly conflicting blog posts on this matter, here I summarize:
jpegoptim and jpegtran perform identically and produce identical results, while mozjpeg takes twice as long for very marginal filesize savings
mozjpeg takes approx 1.7*…

davidtgq
- 3,780
- 10
- 43
- 80
5
votes
2 answers
How to batch convert JPEG images with jpegtran on Windows
Is it possible to batch convert a folder of JPEG images using jpegtran on Windows?
I normally use the following command for one file, but I'm not sure how to apply it to an entire directory of JPEG files:
jpegtran -copy none -optimize a.jpg…

HartleySan
- 7,404
- 14
- 66
- 119
4
votes
1 answer
Combine differently sized JPEGs with jpegtran
I've successfully used jpegtran to combine JPEGs of the same size (512x512) using the method described in this stackoverflow answer: https://stackoverflow.com/a/29615714/2364680
These are tiled JPEGs from the internet that make a 360 panorama when…

grgoelyk
- 397
- 1
- 3
- 12
3
votes
2 answers
Is it possible to losslessly crop/scale a webp similar to jpegtran
Jpegtran allows fast lossless cropping and scaling of jpegs with certain constraints.
Is there a similar tool to do the same for webp files? I couldn't find one.
Is it even possible?

smremde
- 1,800
- 1
- 13
- 25
2
votes
2 answers
Imagemin not enough for google page speed insights?
I am using gulp-imagemin for a while, but few months ago i noticed that google page speed unsatisfied by my compressed images. I tried all combinations of settings but without result. Also tried imagemin-cli and direct jpegtran - all the same, on…

MadDocNC
- 670
- 5
- 17
2
votes
2 answers
How to Install gifsicle, jpegtran, and optipng in AWS Ec2
I am Using a Extension to Optimize Images for Magento . Extension Need to Install gifsicle, jpegtran, and optipng to my Server But i don't know how i will Install & get exact path where installed . Anyone help me to Do this

user2255224
- 79
- 1
- 7
1
vote
0 answers
Performing multiple operations on image in memory with libjpeg
I have an an application where I would like to perform lossless swapping of tiles in a JPEG, resulting in a file such as this:
To do so, I have been able to make a proof-of-concept python script that repeatedly calls the patched jpegtran with crop…

chocolatkey
- 461
- 5
- 6
1
vote
1 answer
How is jpegtran related to libjpeg-turbo, jpegoptim, and mozjpeg?
From what I understand, jpegtran is included with libjpeg-turbo and it is used when saving an Image with optimize=True. Jpegoptim uses an identical algorithm as jpegtran, but requires the image to be temporarily saved to disk before it can be…

davidtgq
- 3,780
- 10
- 43
- 80
0
votes
0 answers
jpegtran jpeg with -scale 8/16 can't be opened, smartscaling issue?
I m trying get a scaled down version of a jpeg with jpegtran by using the scaling feature.
this works (it produces a jpeg that can be opened by any program)
cjpeg.exe -scale 8/16 -outfile halfrez.jpg -optimize -progressive fullrez.ppm
but this…

fred_
- 1,486
- 1
- 19
- 31
0
votes
1 answer
mozjpeg on server with jpegtran with same result like in Squoosh
I installed mozjpeg on my server and tried to get the same compress result like in Squoosh Webinterface with mozjpeg
I compressed an image in Squoosh Webinterface.
Original image: testimage_original.jpg (324kb)
compressed image:…
user10123163
0
votes
1 answer
Using jpegtran to rotate progressive jpegs: invalid SOS parameter for sequential jpeg
My app tries to rotate images based on exif data.
I keep getting requests about jpegtran complaining about ’invalid SOS parameter for sequential jpeg” and jhead aborting operation. Apparently this is not even a fatal warning, and many forums give…

savolai ᯓ
- 666
- 5
- 20
0
votes
0 answers
Compress images without filenames in batch
I got a phpbb forum which has about 40 gb of images and I would like to strip them down all of them. The main problem is that all images are located in a folder where images doesn't have extensions and they are jpeg's, png's, and gif's.
I installed…

Anabanti
- 1
0
votes
0 answers
Image optimization pipeline?
Once I have finalized edits, if I’m planning to run my photos through something like ImageOptim, how should I save my photos in photoshop? Do I use save for web at 72 ppi and high compression, or should I save photos at their highest quality before…

MDLR
- 75
- 7
0
votes
1 answer
Weird "border" with jpegtran when rotating an image
I'm using jpegtran to rotate my images, but it seems to be doing some weird stuff.
The same code/logic worked on my other server. Here is a test case I've done:
test.jpg is the original image, then I run:
jpegtran -rotate 90 test1.jpg >…

Andrew Newby
- 4,941
- 6
- 40
- 81
0
votes
0 answers
Losslessly double JPEG resolution without SmartScale
How can I convert a 256x256 JPEG to a 512x512 JPEG without losing any quality? (I can use jpegtran, but that uses SmartScale, which isn't widely supported.)
It must be converted to JPEG specifically. If it cannot be a literally lossless…

grgoelyk
- 397
- 1
- 3
- 12