Page 2 of 2
Re: Convert ithmb
Posted: 2013-10-16T18:02:45-07:00
by fmw42
snibgo,
IM does have a setting, for interlace of raw images, but I am not sure that is what you need. But you can try that. See
http://www.imagemagick.org/script/comma ... #interlace
Re: Convert ithmb
Posted: 2013-10-16T18:10:16-07:00
by smclellan
Before I go any further, Thank you both. Seriously, it is kinda awesome to get this much help so quickly.
snibgo, I placed your code into a file called fix.sh and made the changes to the double %'s and ^'s per your instrucitons. When I run it -
I get
Code: Select all
fix.sh: line 2: fg: no job control
fix.sh: line 8: fg: no job control
Am I doing this properly?
Re: Convert ithmb
Posted: 2013-10-16T18:14:16-07:00
by snibgo
I think bash shell needs a hash-bang-bin-bash first line thingy.
fmw42 wrote:IM does have a setting, for interlace of raw images...
Yes, I saw that, couldn't make it do anything useful. Or anything at all.
Re: Convert ithmb
Posted: 2013-10-16T18:17:27-07:00
by smclellan
snibgo, scratch that, I figured out the issue with my script. Below are the changes -
Code: Select all
convert \
xc:black xc:white -append -write mpr:m +delete \
-size 720x400 \
tile:mpr:m \
mask.png
convert \
-size 720x480 -depth 16 -sampling-factor 4:2:2 \
T1016.uyvy \
-crop 100^^x50% \
-filter Point -resize 100%x200% \
mask.png \
-composite \
t.png
You are a freaking genius, IMHO. The resulting image is perfect.
https://www.dropbox.com/s/pk30221axinp9um/t.png
Thank you both again. If I can work this out into a script to encompass all the steps, I will post it. I know if it helped me, someone out there is looking for a solution too.
Re: Convert ithmb
Posted: 2013-10-16T18:21:49-07:00
by snibgo
Good stuff. I corrected my script a few seconds after posting it. Change a line from ...
... to ...
Re: Convert ithmb
Posted: 2013-10-16T18:25:07-07:00
by smclellan
I've made those changes to the fix.sh script. It works both ways - don't know why - but here's the modified code.
Code: Select all
convert \
xc:black xc:white -append -write mpr:m +delete \
-size 720x400 \
tile:mpr:m \
mask.png
convert \
-size 720x480 -depth 16 -sampling-factor 4:2:2 \
T1016.uyvy \
-crop 100%x50% \
-filter Point -resize 100%x200% \
mask.png \
-composite \
t.png
Re: Convert ithmb
Posted: 2013-10-16T18:51:54-07:00
by fmw42
You can actually combine this into one command line. See if this works. It seems to for me.
convert \
xc:black xc:white -append -write mpr:m +delete \
-size 720x480 \
tile:mpr:m -write mpr:tile +delete \
-size 720x480 -depth 16 -sampling-factor 4:2:2 \
T1016.uyvy \
-crop 100%x50% \
-filter Point -resize 100%x200% \
mpr:tile \
-composite \
t2.png
Re: Convert ithmb
Posted: 2013-10-16T19:06:25-07:00
by snibgo
Agggghhh ... I made a mistake. For mask.png, I wrote:
This should be the same size as the desired image, so:
And this explains the blockiness at the bottom of the result. With this correction, the blockiness vanishes.
Sorry about that. (fmw42's latest script also needs this correction.)
Re: Convert ithmb
Posted: 2013-10-16T19:37:18-07:00
by fmw42
Sorry about that. (fmw42's latest script also needs this correction.)
Thanks for pointing that out. I have edited my script above.
Re: Convert ithmb
Posted: 2013-10-17T16:54:04-07:00
by smclellan
Hey everybody,
I hope this will help someone out in the future. The following script will take *.ithmb files from an iPod Photo Cache and convert them into usable PNG files.
****Please note, this was written for *.ithmb files from an iPhone Photo cache. I believe it would work with *.ithmb files for any iDevice with the proper changes to the
Code: Select all
-size 720x480 -depth 16 -sampling-factor 4:2:2
options in the second convert section and the proper changes to the
option in the first convert section to create the properly sized mask.png file.****
This code is for UNIX-based OSes, but also could be modified for Windows I suppose - I have no idea how to do that nor do I particularly care to learn so you are on your own for that part.
Just copy and paste the code into a new file and name it Convert.sh (or something similar with the .sh extension) and then run it from within the folder with the *.ithmb files from the terminal with
You will end up with 3 versions of each ithmb file - one *.ithmb version, one *.uyvy version (this is simply a renamed version of the ithmb file used for imagemagick's convert command) and a *.png version (the usable version).
Special thanks to snibgo and fmw42 here and to Keith Wiley for Keith's iPod Photo Reader
http://keithwiley.com/software/keithsIP ... ader.shtml.
Code: Select all
for img in *.ithmb; do
filename=${img%.*}
cp "$filename.ithmb" "$filename.uyvy"&&
convert \
xc:black xc:white -append -write mpr:m +delete \
-size 720x400 \
tile:mpr:m \
mask.png
convert \
-size 720x480 -depth 16 -sampling-factor 4:2:2 \
"$filename.uyvy" \
-crop 100%x50% \
-filter Point -resize 100%x200% \
mask.png \
-composite \
"$filename.png"
done
Re: Convert ithmb
Posted: 2014-03-20T20:19:05-07:00
by vipinbeniwal
I need to covert ithmb file on my windows PC programmatically either using any script or command line or programing in c++,vc++ or any other
could you help me and guide me how can i do this on windows.
thanks.
Re: Convert ithmb
Posted: 2014-09-10T09:55:44-07:00
by RDS3
The utility works great
I have a big ITHMB file 500MB with many photos. I use windows.
The following commands work fine.
convert xc:black xc:white -append -write mpr:m +delete -size 720x400 tile:mpr:m mask.png
convert -size 720x480 -depth 16 -sampling-factor 4:2:2 F1019_3.uyvy -crop 100%x50% -filter Point -resize 100%x200% mask.png -composite F1019_1.png
The problem is it converts 1 image. The ithmb has many images.
Is there a way to break them into multiple files and then use the above commands so that I get a png output for all photos?
Whats the eof character that can be used to break the ITHMB into?
Re: Convert ithmb
Posted: 2014-09-11T02:39:24-07:00
by RDS3
Please ignore earlier question. Found answer on other forums. ITHMB file size / 720*480*2 = Number of photos in the file.