tjko / jpeginfo

jpeginfo - prints information and tests integrity of JPEG/JFIF files
http://www.iki.fi/tjko/projects.html
GNU General Public License v3.0
139 stars 17 forks source link

Win32 support #7

Closed tumagonx closed 4 years ago

tumagonx commented 4 years ago

I have compiled native jpeginfo using mingw32, it works great you just need to change "open" mode from "r" into "rb" in jpeginfo.c which needed for "newline" workaround and IIRC harmless for *nix. Regarding illegal name "aux" name I would suggest you rename it to something else, though it should be okay on MSys/Cygwin as long as the archive decompressed using posix tar/unzip since they use NTAPI instead of Win32API.

tumagonx commented 4 years ago

BTW I found -d option isn't working in Windows because filehandle hasn't closed yet around jpenginfo.c:381 (not sure how this works in linux)

tjko commented 4 years ago

I have compiled native jpeginfo using mingw32, it works great you just need to change "open" mode from "r" into "rb" in jpeginfo.c which needed for "newline" workaround and IIRC harmless for *nix. Regarding illegal name "aux" name I would suggest you rename it to something else, though it should be okay on MSys/Cygwin as long as the archive decompressed using posix tar/unzip since they use NTAPI instead of Win32API.

Thanks, I changed the fopen() call and renamed aux/ to tools/. Does it now work as expected?

tumagonx commented 4 years ago

yes that's works, how about the fclose in jpenginfo.c:381 to fix -d option in Windows?

tjko commented 4 years ago

I had missed that, it should now work?

tumagonx commented 4 years ago

okay thanks.