Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TIFF image too large to display?
TIFF image too large to display? [message #1807377] Tue, 28 May 2019 19:46 Go to next message
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Hi,

I am getting following error when trying to display a large TIFF image. I am wondering if there is a limit on the image size/dimension?

Is there way to shrink the image and then display it?

For this particular image:
Dimension: 18665x13296
Resolution: 400dpi (horizontal and veritical)
Bit Depth: 24
Compression: LZW


java.lang.OutOfMemoryError: Java heap space at org.eclipse.swt.internal.image.TIFFDirectory.decodePixels(TIFFDirectory.java:157) at org.eclipse.swt.internal.image.TIFFDirectory.read(TIFFDirectory.java:499) at org.eclipse.swt.internal.image.TIFFFileFormat.loadFromByteStream(TIFFFileFormat.java:65) at org.eclipse.swt.internal.image.FileFormat.loadFromStream(FileFormat.java:59) at org.eclipse.swt.internal.image.FileFormat.load(FileFormat.java:90) at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:155) at org.eclipse.swt.graphics.ImageDataLoader.load(ImageDataLoader.java:25) at org.eclipse.swt.graphics.ImageData.<init>(ImageData.java:335) at org.eclipse.jface.resource.URLImageDescriptor.getImageData(URLImageDescriptor.java:125)

Thank you very much for the help!
Re: TIFF image too large to display? [message #1807440 is a reply to message #1807377] Thu, 30 May 2019 07:57 Go to previous messageGo to next message
Martin J is currently offline Martin JFriend
Messages: 50
Registered: August 2015
Member
You are getting out of memory error. Your Java app does not have enough heap memory. Try with "-Xmx4000m" argument at java command. Your TIFF file is 1GB big. That 4000m should suffice.
Re: TIFF image too large to display? [message #1807468 is a reply to message #1807440] Thu, 30 May 2019 15:46 Go to previous message
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Thanks Martin!

I tried with that, and I no longer getting "OutOfMemoryError" error.

Previous Topic:TIFF image too large to display?
Next Topic:All black pixels when using gc.print(image) / copyToArea sind Windows 10 1809
Goto Forum:
  


Current Time: Thu Apr 25 15:34:39 GMT 2024

Powered by FUDForum. Page generated in 0.03299 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top