Questions tagged [jpegoptim]
29 questions
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
1
vote
1 answer
Call jpegOptim with RedirectStandardInput and RedirectStandardOutput
I'm trying to do something that seems like it should be relatively simple: Call jpegoptim from C#.
I can get it to write to disk fine, but getting it to accept a stream and emit a stream has so far eluded me - I always end up with 0 length output or…

Chris Moschini
- 36,764
- 19
- 160
- 190
1
vote
1 answer
Saving an image with shell_exec() - using imagejpeg & jpegoptim, with stdin / stdinout
I'm saving an image twice, once when I create it with imagejpeg and then I compress and overwrite with jpegoptim. How may I do this in one swoop, so I'm not saving the image twice?
$im = imagecreatefromstring($imageString);
imagejpeg($im,…

ditto
- 5,917
- 10
- 51
- 88
1
vote
2 answers
Python: Optimizing Images in Memory (StringIO & POpen with jpegoptim)
I'm trying to compress images without touching disk using the STDIN version of various libraries(jpegoptim in this example).
This code does not return an optimized(jpegoptim compressed) image.
Can someone please help or explain why this usage of…

ryan83
- 13
- 4
1
vote
1 answer
jpegoptim PHP shell_exec not compressing images
I am running Linux Centos 6.5 and have installed jpegoptim.
to confirm this I ran yum install jpegoptim and got the following:
Package jpegoptim-1.4.4-1.e16.x86_64 already installed and latest version
Nothing to do
When I run the following no…

Kurt Marshman
- 215
- 2
- 16
1
vote
1 answer
jpegoptim on ASP.Net - "error opening temporary file"
I suspect I'm failing to understand where jpegoptim tries to write its temp files.
I have IIS 7.5 running an ASP.Net 4 AppDomain. In it I have a process that optimizes JPEGs with jpegoptim like so:
FileHelper.Copy(existingPath, optimizerPath);
var…

Chris Moschini
- 36,764
- 19
- 160
- 190
0
votes
0 answers
How can I use JPEGoptim library in pyCharm that requires libJPEG
I want to manipulate images from my PC having windows 7 32 bit and working on python with pycharm IDE. I came to library (jpegOPTIM) that I need for my project.
But according to their installation page i need to install libjpeg before using their…

shank sharma
- 29
- 5
0
votes
2 answers
Argument list too long in Centos after using jpegoptim -m 80 *.jpg
I want to compress all jpg files in directory /var/sentora/hostdata/zadmin/public_html/mysite_com/_files/photo/
using jpegoptim`.
I use code jpegoptim -m 80 *.jpg but it shows error "Argument list too long".
Previously I have increased the ulimit…

FIRSTA ANGGA YS
- 23
- 3
0
votes
2 answers
Request for input on bash script loop
I am trying to run jpegoptim against pictures and at some point in the loop...after let's say 200 iterations, i get "stdin", which requires input to go further.
Is there a way to force the input?
#!/bin/bash
for i in `find . -name "*.jpg" -type f`;…

Potney Switters
- 2,902
- 4
- 33
- 51
0
votes
1 answer
How to work with jpegoptim multithread, and skip fails
I use this command:
find . \( -iname '*.jpg' -o -iname '*.jpeg' \) -print0 | xargs -0 -n 1 -P 4 jpegoptim --max=70 -s
But it fails on some images (jpegoptim receive SEGFAULT) and crash xargs, and all process fail.
How to skip fails, and continue…

Artem Malahov
- 5
- 5
0
votes
1 answer
Advanced usage of jpegoptim
I am currently running the below jpegoptim command via cron to have jpegoptim look for jpg files to compress.
find /home/public_html/public/uploads -name '*.jpg' -type f -print0 | xargs -0 jpegoptim -o -p --size=300k --strip-all
This works, but is…

Sean
- 117
- 2
0
votes
1 answer
Implement io.Reader from image.RGBA
I need a little hint. I'm creating thumbnails of images in Go and would like to pass them to jpegoptim for crushing.
jpegoptim has the --stdin and --stdout flags, which I would like to use. Now, I don't want to save the generated image to disk…

tsdtsdtsd
- 375
- 4
- 17
0
votes
1 answer
jpegoptim save shell last run and check files or folders after this date
I have thousands of images which I optimize weekly by running it over a cronjob. My Problem is that it search also optimized images which lower the CPU. How could I save the last scan / optimization and began to optimize Files and Folders after this…

karadayi
- 2,212
- 2
- 21
- 36
0
votes
1 answer
How to run batch job for multiple extensions with find command?
I am trying to use jpegoptim for optimizing all jpg and jpeg images on my server recursively.
This command is working:
find . -type f -name "*.jpg" -exec jpegoptim --strip-all {} \;
but i need something like this:
find . -type f -name "*.jpg" -or…

mirza
- 5,685
- 10
- 43
- 73