Resizing (or viewing) very large images

Discussion in 'Science and Technology' started by Iasius, Aug 15, 2007.

  1. Iasius

    Iasius Rear Admiral Rear Admiral

    Joined:
    Oct 15, 2003
    I have this approximately 32000x16000 png image that I want to view and/or resize. IrfanView and the like start to consume huge amounts of memory, but do not actually display it.
    I tried Image Magick, but the standard options have no result, ie I enter "convert -resize 2048 input.png output.png" or variations thereof and nothing happens (just quits to prompt again without a message or any output file).

    Anyone have any ideas or programs to handle very large images? Preferably under Windows, but I do have Linux (Ubuntu) installed as well.


    (I have 512 MB memory)
     
  2. Amaris

    Amaris Guest

    I know that Picasa is free and handles all resizes regardless of file size. It's also a photo organizer and editor. It will be difficult because you have so little memory (relatively), and this picture sounds like it's enormous in file size. If push comes to shove you can always email me with it and I'll resize it for you. My system handles massive pics all of the time.

    -J.
     
  3. farmkid

    farmkid Commodore Commodore

    Joined:
    Jun 1, 2005
    Yeah, there's your problem. you don't have enough memory to store the decoded image in memory. Uncompressed, that image is well over 1GB (assuming it's color).

    Image Resizer is one of the Powertoys for Windows XP. I've used it a little and found it to be by far the easiest way to resize images. You simply right-click on the file, click on "resize image", then pick your size. It may work in your case because you don't have to actually open the file first. Get it here. The link is about 3/4 of the way down on the right hand side.

    If that doesn't work, this sounds to me like a great excuse to buy more RAM. :)
     
  4. Iasius

    Iasius Rear Admiral Rear Admiral

    Joined:
    Oct 15, 2003
    It's actually almost 4 GB (32704x16352x8) uncompressed. A couple more GB of RAM and the new mainboard and other equipment I'd need in order to have more than 1 GB RAM potentially would help with that. But I do not plan on buying new computer equipment anytime soon since I don't really need that for anything else really.
    In any case, eventually I'd like to be able to resize images several times larger (up to ~128000x64000) and I'm not about to buy 64 GB of RAM. ;)
     
  5. farmkid

    farmkid Commodore Commodore

    Joined:
    Jun 1, 2005
    Well, my comment wasn't entirely serious. But personally, I welcome excuses to upgrade, especially ones that are good enough to convince my wife.

    So...did you try Image Resizer?

    Another thought: you might be able to open it by manually setting your page file size to some obscene size like 5 GB or something. You might be able to open the file, but it will surely take a long time and be very sluggish. Maybe you could start opening the file then go out for dinner and a movie. Start the conversion process when you get back and then go to bed. You may have a useable file in the morning. In the case of larger files, good luck.
     
  6. Deleted 2

    Deleted 2 Vice Admiral

    Joined:
    Aug 11, 2004
    8 bytes per pixel? So that's 16bpp RGBA? It seems the PNG spec does allow for this, but I'm getting rather curious where you obtain these images.

    At > 4GiB sizes, and assuming a 32-bits system, it's the computer's memory addressing ability that's the limiting factor, not the amount of physical RAM. Which means there are no real 'shortcuts' to take for image manipulation programs.

    On the other hand, something did write the image in the first place, and probably presumed that it would be useful to someone. Hence my original question :)
     
  7. Daedalus12

    Daedalus12 Rear Admiral Rear Admiral

    Joined:
    Oct 9, 2002
    Location:
    Transatlantic Flights
    My initial guess would be some sort of satellite imagery or geological survey taken with a CCD camera but those are usually in the TIFF format.

    You can try to use the stream tool in imagemagick to break up the source image into smaller sections and resize each invidividually before putting the results back together.
     
  8. Iasius

    Iasius Rear Admiral Rear Admiral

    Joined:
    Oct 15, 2003
    The simpler explanation is the case (I blame it on the beer/awful soccer game yesterday [​IMG]). It's 8 bits. That makes me wonder even more why nothing's worked so far.
    Edit: At least for this size it works with IrfanView Batch Conversion (displaying it does not work). However I had to disable the resample option for some reason.

    These are "screenshots" from a game btw. They show the entire map which is quite nice to have since you can't actually zoom out much. This way I can actually plan where to lay railway tracks and make a good network. The thing is, this screenshot is from one of the smallest map sizes (512x512 tiles). There are maps up to 2048x2048 tiles which is where the really huge images would come from.