Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot convert from rgb to monochrome
#1
Hi. I'm running Windows 10 Pro, on a fairly old Gigabyte motherboard (965P-DS3). A 32 bit system. Installed with GIMP 2.8.22.

With :
* 4Gb installed physical memory
* 3.50Gb total physical memory
* 1.93Gb available physical memory
* 7Gb total virtual memory
* 5.15Gb avialable virtual memory
* 3.50Gb page file space

I think my jpg file is 15380 pixels x 10511 pixels. File size 39.9Mb.

GIMP opens the file fine. But it crashes when I try to convert from rgb to monochrome. It does about one quarter of the conversion then reports a Glib error and a failure to allocate so many bytes.

Apparantly then, this is memory issue, I have insufficient RAM. Even though I have 4Gb of installed RAM. I think Windows 10 is eating up a lot of it.

Can I use a 16Gb memory stick I have to solve this issue? Any other solutions? Thanks. Rich
Reply
#2
That 39.9 MB jpg will be 1.5 (and more) GB in Gimp. Put the cursor at the bottom of Gimp window and the size in memory shows.

There are memory constraints using a 32 bit system, maybe that is kicking in.

Not sure if ImageMagick will work on such a large image but worth a try. https://www.imagemagick.org/script/download.php scroll down to bottom of page.

The syntax is simple: A windows cmd terminal where the image is stored and

Code:
magick convert something.jpg -colorspace gray new.jpg
Reply
#3
When I create a 15000x15000 image, Gimp tells me the image is 2.1GB (265MPx, 4 bytes/pixels, likely the existing layer, the rendering mayer, a selection mask... This is dangerously close to your max virtual memory limit (around 3.5GB in 32 bits, 4GB theoretical minus some address space for the system needs...). However, if the Gimp tile cache size (Edit>Preferences>Environment>Tile cache size) is set to something reasonable (2GB or so) Gimp will swap to disk without using that much memory (but that will be slow).
Reply
#4
Hi. Okay, to recap: I've got a PC with 32 bit system, which has insuffcient RAM (and I've got 4Gb installed) to enable GIMP to edit or otherwise deal with a jpg file that is 15380 pixels x 10511 pixels. File size 39.9Mb.

As directed, I downloaded a version of Image Magic. I chose Windows version - ImageMagick-7.0.7-22-Q8-x86-static.exe. (8 bit)

That was chosen because my image is a simple map.  Not many colours in it, in fact greyscale is fine.

Opening up a command prompt (actually I did an elevated prompt) I navigated to the directory where my large file is.  Then I wrote at the command prompt (substituting the actual filename instead of "something.jpg"):


Code:
magick convert something.jpg -colorspace gray new.jpg

I then opened up the newly created file (I actually called it "new.jpg"). And I used the threshold tool to remove colouration.  And it worked. I now have a cleaned up image of the map. Some discolouration, which was an eyesore, has been removed. But the whole map is cleaner.

Interesting the new file is actually bigger than the original file at 56.5Mb - according to windows. But, GIMP seems to be handling it.  Thanks.

P.S. The original file apparantly is a lut style RGB XYZ input profle. I cannot remember if I converted it or kept it when opening the file. Nor know whether I should have converted or not. Oh, but that's not relevant, because I converted the file with Image Magic. :-)
Reply


Forum Jump: