There is also another option that using a jni interface to an image
library. You can always execute a command line tool which you use to
create a temporary file for the resize and crop and then load that.

I switched my photo web site code to do this as I was having memory and
quality problems with JAI.

Paul

Larry Becker wrote:
> This whole issue of support for large image sizes is the reason that
> SkyJUMP doesn't have Image Layers yet.  It seems to open up a can of
> worms.  If you need jai to process images, IMHO you are already in
> (memory) trouble.  Also, some formats, such as GeoTIFF are simply to
> complex to ever get working reliably for all variations.  As with the
> discussions of vector formats, it all boils down to the fact that
> there isn't one single good (and open) file format that well
> supported.
>
> I think that perhaps the best way to handle image formats (and perhaps
> some other issues too) is to bite the bullet and add a JNI interface
> to gdal.  I can imagine modifying the MrSID plugin (which uses JNI) to
> do this.  I believe there are versions of gdal for most platforms.
>
> regards,
> Larry
>
> On 8/17/07, Rahkonen Jukka <[EMAIL PROTECTED]> wrote:
>   
>> Hi,
>>
>> It really seems to be due to the size. I made small versions (1000 by 1000 
>> pixels) of the png and jpg images, and they do work.  They also seem to 
>> accept both .tfw named world files and those named according to image format 
>> (jgw/pgw).  That's good.
>>
>> User should get some informative warning about file exceeding the size 
>> limits, perhaps with a hint to use tiff of ecw formats instead for bigger 
>> images.
>>
>> By the way, those interested in trying how OpenJUMP performs with ecw can 
>> download wonderful images to play with from geotorrent.org. For example 1.8 
>> gigabyte europe_landsat742 image covering almost whole Europe, despite half 
>> of Finland :( , works very well and consumes just few tens of megabytes of 
>> OpenJUMP memory.  Image dimensions totals 141970 by 141970 pixels.  There 
>> are other good images as well, and they are free for any use.
>>
>> -Jukka-
>>
>>
>>
>>
>>
>>     
>>> -----Alkuperäinen viesti-----
>>> Lähettäjä: [EMAIL PROTECTED]
>>> [mailto:[EMAIL PROTECTED]
>>> Puolesta Stefan Steiniger
>>> Lähetetty: 17. elokuuta 2007 14:34
>>> Vastaanottaja: List for discussion of JPP development and use.
>>> Aihe: Re: [JPP-Devel] OJN 1.2D: Add Image Layer
>>>
>>> btw.. if it does not load..
>>> can it be a image size problem?
>>>
>>> because 9996x9996 px is shown by Adobe Photoshop as file with
>>> 285MB size in memory (stored as jpg: 15MB - of course
>>> depending on the image packability itself)
>>>
>>> If i try to load the file with OpenJUMP (java memory option
>>> -Xmx256M)..
>>> then it is not shown as well.. without any error message
>>>
>>> don't know how diffcult it is to obtain at least a message
>>> from jai that the file is to large.
>>>
>>>
>>> stefan
>>>
>>> Rahkonen Jukka schrieb:
>>>       
>>>> Hi,
>>>>
>>>> I made a quick test with one 9996 by 9996 pixel colour
>>>>         
>>> image. The original is band interleaved geotiff. I converted
>>> it with gdal_translate to following formats:
>>>       
>>>> - png (gdal_translate -of PNG jumptest.tif jumptest.png)
>>>> - jpeg (gdal_translate -of jpeg jumptest.tif jumptest.jpg)
>>>> - ecw (gdal_translate -of ECW -co LARGE_OK=YES jumptest.tif
>>>>         
>>> jumptest.ecw)
>>>       
>>>> - pixel interleaved geotiff (gdal_translate -of GTiff -co
>>>>         
>>> interleave=pixel jumptest.tif jumptest_pixel_int.tif)
>>>       
>>>> I created also ESRI world file (.tfw) and copied it for
>>>>         
>>> jpeg and png formats as .jgw and .pgw, respectively.
>>>       
>>>> Results:
>>>> - band interleaved tiff does not show
>>>> - jpeg does not show
>>>> - png does not show
>>>> - pixel interleaved tiff shows OK
>>>> - ecw shows OK
>>>>
>>>> Read error with band interleaved tiffs is quite usual, and
>>>>         
>>> a few weeks ago GDAL default was changed to pixel interleave.
>>> There must be another reason for problems with jpeg and png.
>>>       
>>>> Right click - Properties on the failed jpeg and png image
>>>>         
>>> layer shows this error:
>>>       
>>>> Javax.media.jai.util.ImagingException: All factories fail
>>>>         
>>> for the operation "FileLoad"
>>>       
>>>> Regards,
>>>>
>>>> -Jukka-
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>>> -----Alkuperäinen viesti-----
>>>>> Lähettäjä: [EMAIL PROTECTED]
>>>>> [mailto:[EMAIL PROTECTED]
>>>>> Puolesta Uwe Dalluege
>>>>> Lähetetty: 17. elokuuta 2007 11:48
>>>>> Vastaanottaja: Devel Jump
>>>>> Aihe: [JPP-Devel] OJN 1.2D: Add Image Layer
>>>>>
>>>>> Hi,
>>>>>
>>>>> when I load a TIFF file which has a worldfile with Layer>Add
>>>>> Image Layer a new layer appears but nothing happens (no
>>>>> errormessage and no image)!
>>>>>
>>>>> Running OpenJUMPNight 1.2D with Eclipse I see the error:
>>>>>
>>>>> com.vividsolutions.jump.JUMPException: Neither geotiff tags
>>>>> nor valid worldfile found.
>>>>> This is not a valid GeoTIFF file.
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage
>>>>> .init(GeoTIFFImage.java:72)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage
>>>>> .<init>(GeoTIFFImage.java:56)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.imagery.geotiff.GeoTIFFImage
>>>>> Factory.createImage(GeoTIFFImageFactory.java:53)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.
>>>>> createImage(ImageryLayerDataset.java:76)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu
>>>>> reCreator.createFeature(ImageFeatureCreator.java:174)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu
>>>>> reCreator.access$0(ImageFeatureCreator.java:159)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu
>>>>> reCreator$1.yield(ImageFeatureCreator.java:153)
>>>>>     at
>>>>> com.vividsolutions.jump.util.CollectionUtil.collect(Collection
>>>>> Util.java:298)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu
>>>>> reCreator.createFeatures(ImageFeatureCreator.java:148)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageFeatu
>>>>> reCreator.getImages(ImageFeatureCreator.java:79)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLa
>>>>> yerPlugIn.execute(AddImageLayerPlugIn.java:34)
>>>>>     at
>>>>> com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.acti
>>>>> onPerformed(AbstractPlugIn.java:130)
>>>>>     at
>>>>>           
>>> javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>>>       
>>>>>     at
>>>>> javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
>>>>>     at
>>>>> javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
>>>>>     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>>>>>     at javax.swing.AbstractButton.doClick(Unknown Source)
>>>>>     at
>>>>>           
>>> javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
>>>       
>>>>>     at
>>>>> javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(U
>>>>> nknown Source)
>>>>>     at java.awt.Component.processMouseEvent(Unknown Source)
>>>>>     at javax.swing.JComponent.processMouseEvent(Unknown Source)
>>>>>     at java.awt.Component.processEvent(Unknown Source)
>>>>>     at java.awt.Container.processEvent(Unknown Source)
>>>>>     at java.awt.Component.dispatchEventImpl(Unknown Source)
>>>>>     at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>>>     at java.awt.Component.dispatchEvent(Unknown Source)
>>>>>     at
>>>>> java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
>>>>>     at
>>>>> java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>>>>>     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>>>>>     at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>>>     at java.awt.Window.dispatchEventImpl(Unknown Source)
>>>>>     at java.awt.Component.dispatchEvent(Unknown Source)
>>>>>     at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>>>>     at
>>>>>
>>>>>           
>>> java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
>>>       
>>>>>     at
>>>>> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>>>>>     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>>>     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>>>     at java.awt.EventDispatchThread.run(Unknown Source)
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Uwe
>>>>>
>>>>>
>>>>> --------------------------------------------------------------
>>>>> -----------
>>>>> This SF.net email is sponsored by: Splunk Inc.
>>>>> Still grepping through log files to find problems?  Stop.
>>>>> Now Search log events and configuration files using AJAX and
>>>>> a browser.
>>>>> Download your FREE copy of Splunk now >>
>>>>> http://get.splunk.com/
>>>>>           
>>> _______________________________________________
>>>       
>>>>> Jump-pilot-devel mailing list
>>>>> Jump-pilot-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>>
>>>>>           
>>>>         
>>> --------------------------------------------------------------
>>> -----------
>>>       
>>>> This SF.net email is sponsored by: Splunk Inc.
>>>> Still grepping through log files to find problems?  Stop.
>>>> Now Search log events and configuration files using AJAX
>>>>         
>>> and a browser.
>>>       
>>>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>>>> _______________________________________________
>>>> Jump-pilot-devel mailing list
>>>> Jump-pilot-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>
>>>>
>>>>         
>>> --------------------------------------------------------------
>>> -----------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems?  Stop.
>>> Now Search log events and configuration files using AJAX and
>>> a browser.
>>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>>> _______________________________________________
>>> Jump-pilot-devel mailing list
>>> Jump-pilot-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>
>>>       
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>     
>
>
>   



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to