Public bug reported:

For optimizing files in-place with jpegtran, especially from scripts and
when dealing with lots of pictures, it's handy to be able to specify
input file as -outfile.

But there's a catch:

Steps to reproduce:
0. Have a large JPEG file, or, alternatively, somewhat slow CPU
1. `jpegtran -optimize -copy all -perfect -outfile large.jpg large.jpg`
2. Hit Ctrl-C before the command finishes

Result:
You now have a broken large.jpg with only part, if any, of the image data 
remaining.

What I expect to happen:
To have large.jpg as it was before I invoked jpegtran.

Workarounds:
Obviously the traditional workaround of specifying an intermediate temporary 
output file, then replacing the original with the temporary file only once 
jpegtran has finished.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libjpeg-turbo-progs 1.4.2-0ubuntu3
ProcVersionSignature: Ubuntu 4.8.0-53.56~16.04.1-generic 4.8.17
Uname: Linux 4.8.0-53-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
CurrentDesktop: Unity
Date: Thu May 25 17:16:16 2017
InstallationDate: Installed on 2016-10-13 (224 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 
(20160719)
SourcePackage: libjpeg-turbo
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: libjpeg-turbo (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1693520

Title:
  Interrupting (Ctrl-C) jpegtran causes data loss when -outfile points
  to input file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libjpeg-turbo/+bug/1693520/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to