Convert ithmb
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert ithmb
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
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
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
Am I doing this properly?
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 -
Code: Select all
sh fix.sh T1016.png
Code: Select all
fix.sh: line 2: fg: no job control
fix.sh: line 8: fg: no job control
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert ithmb
I think bash shell needs a hash-bang-bin-bash first line thingy.
Yes, I saw that, couldn't make it do anything useful. Or anything at all.fmw42 wrote:IM does have a setting, for interlace of raw images...
snibgo's IM pages: im.snibgo.com
Re: Convert ithmb
snibgo, scratch that, I figured out the issue with my script. Below are the changes -
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.
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
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.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert ithmb
Good stuff. I corrected my script a few seconds after posting it. Change a line from ...
... to ...
Code: Select all
-crop 100^^x50% \
Code: Select all
-crop 100%x50% \
snibgo's IM pages: im.snibgo.com
Re: Convert ithmb
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert ithmb
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
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
Last edited by fmw42 on 2013-10-16T19:36:50-07:00, edited 1 time in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert ithmb
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.)
Code: Select all
-size 720x400 \
Code: Select all
-size 720x480 \
Sorry about that. (fmw42's latest script also needs this correction.)
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert ithmb
Thanks for pointing that out. I have edited my script above.Sorry about that. (fmw42's latest script also needs this correction.)
Re: Convert ithmb
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 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.
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
Code: Select all
-size 720x400
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
Code: Select all
sh Convert.sh
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
-
- Posts: 1
- Joined: 2014-03-20T20:15:32-07:00
- Authentication code: 6789
Re: Convert ithmb
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.
could you help me and guide me how can i do this on windows.
thanks.
Re: Convert ithmb
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?
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
Please ignore earlier question. Found answer on other forums. ITHMB file size / 720*480*2 = Number of photos in the file.