When the JPG is just too big |
![]() ![]() |
When the JPG is just too big |
Oct 9 2006, 05:17 PM
Post
#1
|
|
|
Administrator ![]() ![]() ![]() ![]() Group: Chairman Posts: 13269 Joined: 8-February 04 Member No.: 1 |
Like most - I'm now HiRISE obsessed - so I'm often finding myself trying to load images that are 10-20k on a side.
The large Victoria JPG - the 25k x 34k 'red' filter image I found would not load in Photoshop, Imageready or Gimp - and others have cited similar problems...I've found an answer.. www.imagemagick.org ( and for me - specifically http://www.imagemagick.org/download/binari...windows-dll.exe ) I installed that and simply doing convert red.jpg red.png - gave me a 500mb PNG of the 200 odd MB JPG which Photoshop loaded very quickly indeed. I've tried comparing some of the smaller PNG's and JPG's from the HiRISE team and there is very very little difference - for the sanity of the HiRISE server, your own hard drive and bandwidth useage in general, my plan is to use the JPG's where possible, and if they're too big for photoshop, use Imagemagick to convert to PNG, and in some cases simple convert a subset of the image to PNG ( i.e. from pixel x,y to pixel a,b only ) Doug |
|
|
|
Oct 9 2006, 06:17 PM
Post
#2
|
|
![]() Dublin Correspondent ![]() ![]() ![]() ![]() Group: Admin Posts: 1772 Joined: 28-March 05 From: Celbridge, Ireland Member No.: 220 |
Dang.
Considering that I've spent so much time playing around with IM I'm a bit disgusted that I didn't think it would be up to the task so I didn't even try. Nice catch Doug. |
|
|
|
Oct 9 2006, 06:38 PM
Post
#3
|
|
![]() Chief Assistant ![]() ![]() ![]() ![]() Group: Admin Posts: 1374 Joined: 5-January 05 From: Belgium Member No.: 136 |
How much ram are you using?
Nico -------------------- |
|
|
|
Oct 9 2006, 06:52 PM
Post
#4
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 1636 Joined: 9-May 05 From: Lima, Peru Member No.: 385 |
I have tried to open an 210 MB JPEG from the Hiroc by Photoshop, MS Imaging and WEB Browser without any success. All of them, the error msg is: It cannot be displayed, because it contains errors.
How were yours? Rodolfo |
|
|
|
Oct 9 2006, 07:02 PM
Post
#5
|
|
|
Administrator ![]() ![]() ![]() ![]() Group: Chairman Posts: 13269 Joined: 8-February 04 Member No.: 1 |
I have 2 Gig - and I was getting errors in everything execpt just double clicking on the JPG in windows and getting the preview window.
Doug |
|
|
|
Oct 9 2006, 07:16 PM
Post
#6
|
|
![]() Chief Assistant ![]() ![]() ![]() ![]() Group: Admin Posts: 1374 Joined: 5-January 05 From: Belgium Member No.: 136 |
I'm trying to download the file to see for myself. I've tried downloading it several times but something's fishy with my connection from time to time
Nico -------------------- |
|
|
|
Oct 9 2006, 07:20 PM
Post
#7
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 1636 Joined: 9-May 05 From: Lima, Peru Member No.: 385 |
I'm trying to download the file to see for myself. I've tried downloading it several times but something's fishy with my connection from time to time Nico You can solve it by using the one of the FireFox extensions which manages the resume after any communications failure. "DownThemAll!". During the downloading process, the communications has cut many times but the wonderfull product was able to resume until its completion. Rodolfo |
|
|
|
Oct 9 2006, 07:34 PM
Post
#8
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 1636 Joined: 9-May 05 From: Lima, Peru Member No.: 385 |
I have 2 Gig - and I was getting errors in everything execpt just double clicking on the JPG in windows and getting the preview window. Doug The same to me with 1 GB RAM. Maybe, the image is corrupted or it might have corrupted by a long and interrupted downloading process. Hence, the MRO is becoming a new imaging wave by forcing us to upgrade the CPU, HDisk and RAM computer components. Rodolfo |
|
|
|
Oct 9 2006, 07:39 PM
Post
#9
|
|
|
Administrator ![]() ![]() ![]() ![]() Group: Chairman Posts: 13269 Joined: 8-February 04 Member No.: 1 |
No - the image file is fine -imagemagik can handle it, as can windows all on its own - just the larger apps can not manage to open it. When photoshop says it is corrupt - it is basically lying.
|
|
|
|
Oct 9 2006, 07:54 PM
Post
#10
|
|
|
Member ![]() ![]() ![]() Group: Members Posts: 165 Joined: 18-July 06 Member No.: 981 |
At first blush, IM is a bit geeky (it is command line based after all). If you find something that works great, please post the command line you used here and a sample of the result. Thanks.
|
|
|
|
Oct 9 2006, 08:08 PM
Post
#11
|
|
![]() Chief Assistant ![]() ![]() ![]() ![]() Group: Admin Posts: 1374 Joined: 5-January 05 From: Belgium Member No.: 136 |
Thanks for the tip Rodolfo
I'm using 4 gig (3.6 recognized) and I get this message in PS(see attachment below) A very basic python script to convert to .png; Just install python (via http://www.python.org) and PIL (Python Imaging Library). The file you choose to use in the script must be in the same directory as the script itself.. download by 'save target as'. -> http://www.awalkonmars.com/jpg2png.py Nico edit; perhaps a bit geeky too... -------------------- |
|
|
|
Oct 9 2006, 09:43 PM
Post
#12
|
|
![]() Dublin Correspondent ![]() ![]() ![]() ![]() Group: Admin Posts: 1772 Joined: 28-March 05 From: Celbridge, Ireland Member No.: 220 |
Here's some discussion on using ImageMagick to process HiRise IMG's
For my part I've thrown this at the monster: convert TRA_000873_1780_RED.jpg -crop 4096x4096 +repage Victoria-%d.png Just to see if it does give me 50 or so images. I don't expect it to finish anytime soon as I'm running it on my laptop. I think it might be smarter to kick my girlfriend off the desktop with the Raptor as ImageMagick doesn't seem to care so much about RAM but really seems to like having a fast hard drive. |
|
|
|
Oct 9 2006, 10:11 PM
Post
#13
|
|
|
Administrator ![]() ![]() ![]() ![]() Group: Chairman Posts: 13269 Joined: 8-February 04 Member No.: 1 |
Assuming the girlfriend is typical of internet usage for females - she's using Ebay and emailing 'men are useless because....' emails to other like minded females..
She doesn't need the raptor Doug |
|
|
|
Oct 10 2006, 12:33 AM
Post
#14
|
|
![]() Member ![]() ![]() ![]() Group: Members Posts: 809 Joined: 11-March 04 Member No.: 56 |
Assuming the girlfriend is typical of internet usage for females - she's using Ebay and emailing 'men are useless because....' emails to other like minded females.. I understand that most of the people who post to this board are something over 90% male, and of course it's Doug's board and he can post whatever he likes. But I feel obliged to note that a remark like that is likely to make women who do read this board feel somewhat unwelcome. |
|
|
|
Oct 10 2006, 06:39 AM
Post
#15
|
|
![]() Dublin Correspondent ![]() ![]() ![]() ![]() Group: Admin Posts: 1772 Joined: 28-March 05 From: Celbridge, Ireland Member No.: 220 |
She doesn't need the raptor She would disagree, I think, being the one who generally does the hard core image processing. Anyway for the curious this exercise took slightly more than 2.5 hours to complete on an IBM T43 (1.8Ghz Pentium M (Dothan), 1GB RAM, 5400rpm laptop drive). I'm going to have to run it on the Raptor equipped desktop now to see how much more suitable that is for this sort of thing. For those that might be interested I was intrigued to see that the temporary files that ImageMagick created to deal with this were quite frankly enormous. The initial step appears to be that the jpg is expanded out into an internal flat image format that uses 10 bytes per pixel - this results in an 8.7GB "image" file that is then subdivided into slices of the requested size and those are finally re-encoded into the requested format (PNG) in this case. This one command used more than 17GB of temp file space and I think somewhere around 30GB of overall disk I/O. That's a serious test of your disk subsystem. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 11:20 AM |
|
RULES AND GUIDELINES Please read the Forum Rules and Guidelines before posting. IMAGE COPYRIGHT |
OPINIONS AND MODERATION Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators. |
SUPPORT THE FORUM Unmannedspaceflight.com is a project of the Planetary Society and is funded by donations from visitors and members. Help keep this forum up and running by contributing here. |
|