[Nottingham] Tweaking the orientation flag in a jpeg
Roger Light
roger at atchoo.org
Wed Sep 1 13:03:19 UTC 2010
Hi Graham,
I don't, but it's fairly simple to put together. I've created a quick
C program that should do what you want. It's at
http://atchoo.org/temp/tweak.c
It's pretty basic - it assumes that the files will fit into memory
completely for example.
You'll need to modify it first to set the offset of the byte that you
want to change. Then compile it with "gcc -o tweak tweak.c"
After that, run either as:
./tweak <input file>
which will overwrite the input file (no guarantees you won't lose your
data!), or:
./tweak <input file> <output file>
Cheers,
Roger
On Wed, Sep 1, 2010 at 12:44 PM, Graham Dicker
<graham.dicker at antecor.com> wrote:
> Hi everyone
>
> Does anyone know of a utility that can modify just one byte at a given offset
> in a file? I want to change the orientation flag in a set of jpegs for which
> lossless rotate is not an option. The flag is at the same offset in every file
> and just needs to be changed from a 1 to a 6.
>
> Thanks
>
> Graham
>
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>
More information about the Nottingham
mailing list