Skip to content

No output file if identical to input file #434

@FredWahl

Description

@FredWahl

I have created a program that automates jpegtran. The output file should be optimised using the recommended flags. The problem is that there are many files and new files are being added so there’s no way of knowing which files have been optimised. It takes time so it would run faster when it tries to optimise something that already has been optimised. I simply look at the filsesizes and if they are different, I overwrite the input file. If they are equal, nothing has changed, and then I delete it.

I think it’s fairly common that you run jpegtran multiple times on files with settings such that jpegtran does nothing other than creating an identical output file. If you have a web site where pictures are added all the time then you have this problem.

Cheers,
Fredrik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions