Exiftool batch update not working - batch-processing

There are two folders with images in them and the filenames of the images are identical.
I'd like to copy the exif data of the images from one folder to another. Exiftool seems to be the perfect tool to do this job. According to the documentation this command should work:
exiftool -TagsFromFile ../../temp/source/%d%f.JPG -all:all -ext JPG ../../temp/target
The console even returns this:
1 directories scanned
17 image files updated
However when I check the results the source and target file exif datas are different.
What am I doing wrong?

Related

Convert .bin to .png for files located in word/embedding of a word.zip file

I am stuck at this problem for some hours now.
I have a wordfile with embedded OLE objects. The OLE-Objects are PNG-files.
I unzipped the word-file via renaming it to .zip and found the files I need via \document.xml and _rels\document.xml.rels whereby I could identify the needed OLE-Object in the documents.xml and the r:id under <v:imagedata> linked to the respective OLE-Object in the document.xml.rels.
Now when I open the OLE-Object via the word file, it is recognized as expected as a PNG. When I look it up under \embeddings\oleObject1.bin, it is no longer a png, but a bin instead.
Now simply renaming the bin to png does not work...
My question would be: How do I turn this bin into a graphics format I can use?
Thank you very much!
*.bin streams are themselves zip archives. When you extract them you will find their true contents along with some meta-data.

inkscape: multiple page pdf to multiple png

when I convert pdf to image in linux command line, it seems inkscape gets the best result (better quality than gs with same dpi). Unfortunately, it only converts the first page to png. How to convert every pdf page to different png file? Do I have to extract one PDF page and store to a new pdf file , then do inkscape concert, and so on?
This isn't solely using Inkscape, but you could use e.g. pdftk to split up the pdf-file into separate pages and convert every page into a png with Inkscape. For example, like this:
pdftk file.pdf burst;
l=$(ls pg_*.pdf)
for i in $l; do inkscape "$i" -z --export-dpi=300 --export-area-page --export-png="$i.png"; done
Note that pdftk burst creates pdf-files called pg_0001.pdf, etc., so if you have any files named like that, they'll be overwritten. You can remove them afterwards easily using
rm pg_*.pdf
Lu Kas' answer threw warnings for me without doing the conversion. Probably because I'm running Inkscape 1.1
However, i got it running by replacing some deprecated commands:
inkscape pdfFile.pdf --export-dpi=300 --export-area-page --export-filename=imageFile.png;
For batch processing rather than slowly looping through file by file inkscape has a shell mode for command file scripting. See https://wiki.inkscape.org/wiki/index.php/Using_the_Command_Line#Shell_mode
However like all other #file.txt scripts you need to write a custom text file. and for Windows users run against higher ranking inkscape.com not .exe
Since version 1.0 (currently 1.2) a multipage pdf of contents can be addressed for multiple outputs. for some other examples see https://inkscape.org/doc/inkscape-man.html#EXAMPLES
Commands get replaced over time so currently to export png use --export-type="xxx" to batch export a list of input files to type xxx. Thus in this case --export-type="png"
Also for pdf related inputs and support see https://wiki.inkscape.org/wiki/index.php/Using_the_Command_Line#New_options
For windows users there is a handy batchfile converter here https://gist.github.com/JohannesDeml/779b29128cdd7f216ab5000466404f11

trigger.io "The binary being analyzed must be an executable" itune issue

I went to upload my ipa as I normaly do and after upload it via itunes I got this email
The binary being analyzed must be an executable: /tmp/mz_3482061619165087240dir/conbop-1377470196-1.ipa/Payload/device-ios.app/Forge
The file 'device-ios.app/Default-568h#2x~iphone.png' is labeled as a PNG file, but is not valid to that format; file command reports: './device-ios.app/Default-568h#2x~iphone.png: JPEG image data, EXIF standard '
The file 'device-ios.app/Default-Landscape#2x~ipad.png' is labeled as a PNG file, but is not valid to that format; file command reports: './device-ios.app/Default-Landscape#2x~ipad.png: JPEG image data, EXIF standard '
The file 'device-ios.app/Default-Portrait#2x~ipad.png' is labeled as a PNG file, but is not valid to that format; file command reports: './device-ios.app/Default-Portrait#2x~ipad.png: JPEG image data, EXIF standard '
The file 'device-ios.app/Default-Portrait~ipad.png' is labeled as a PNG file, but is not valid to that format; file command reports: './device-ios.app/Default-Portrait~ipad.png: JPEG image data, EXIF standard '
The file 'device-ios.app/Default#2x~iphone.png' is labeled as a PNG file, but is not valid to that format; file command reports: './device-ios.app/Default#2x~iphone.png: JPEG image data, EXIF standard '
The file 'device-ios.app/Default~iphone.png' is labeled as a PNG file, but is not valid to that format; file command reports: './device-ios.app/Default~iphone.png: JPEG image data, EXIF standard '
Any help would be appreciated as to why itunes is kicking this back.
Thanks!
The image errors are because Apple require all the images are png files rather than jpgs, they appear to have recently become more strict about enforcing this which might be why you haven't had these problems before, you should be able to resave the files as png with an image editor.
I've not seen the binary is not an executable error before, I'd recommend trying again once you fix the image issues, if you still see that error it would be great if you could send your ipa file to support#trigger.io and we'll take a look at it.
I did have to change the images as well as do some other things with permissions. Connorhd explained in this post how to change the permissions for the time being.
The binary being analyzed must be an executable trigger.io

Will PDFToImage Extract embedded images also - pdfbox?

Would PDFToImage command do the image extraction also ?
I want to convert the PDF files To Image (PDFBOX)
I am using PDFToImage command for pdf to image file conversion,but i'm missing All Embedded images in PDF when I ran PDFToImage.
Or Do I need to Run Extract Images separately to extract images from PDFFiles?
Is there any other way to Achieve this ???
thanks in advance ...
PDFToImage is converting PDF pages into images and output one image per page.
You are looking for ExtractImages which extracts all embedded images of a PDF document.
More information about ExtractImages can be found there:
http://pdfbox.apache.org/apidocs/org/apache/pdfbox/ExtractImages.html
To answer your question more specifically, these two programs do different things. You can recode a single one that gathers the two functionalities, or run them separately.

Extract "cover image" from CHM and EPUB files

How can I programmatically and reliably create PNG images from CHM and EPUB files? The page that's needed is only the first one, as in "cover image thumbnail generation".
Could this even be done just from the command line?
I have already looked at the open-source CHM QuickLook plug-in for MacOSX for source that does this and at Calibre, the latter to no avail.
In CHM, the default page is a webpage (a .html file). Of course it can only contain one page.
An extracter program is easy to do based on chmlib or Free Pascal's libs, but it will need the html parsed to also find names of other programs to extract. Roughly the algorithm would be:
use some "list" function of a cmdline extract tool to get the default page's name. (this is stored in an internal record)
extract it, and parse it for img and other referencing tags.
extract those.
The biggest picture downloaded in the previous step is probably "it"!