Hi Peppe and others, i committed Peppes code with some changes: - I did some refactoring and formatting of the SaveIamge... class - I added o.close() etc., in some locations as Eclipse recommended to close the print streams - I moved your last else-if condition (ASC || GRD || XYZ) that would write an *.info file as the logic you used would not allow it to be executed. - for writing monoband tif images I got an error message (could have been due to my refactoring, though) and also saving as Gif does not work. But ASC, Grd, Png and JPG is working, and using Imaging IO for tif works as well. However, I found that a colour image I have loaded into OJ is saved in grey (for tif & png). But this could be a problem with our Sextante driver, as the Sextante image info returns that it is a one-band image. Maybe something is not set correctly on RasterImageLayer and OpenJUMPSextanteRaster initialisation.
Unfortunately I need to defer fixing Gif and proper JPG & Png support (= writing colour images) to another time. For improvements of the current code, you would need to update to my last version from svn. Hope thats ok. cheers, Stefan Am 24.09.13 12:36, schrieb Giuseppe Aruta: > Hi Stefan and all, > Coming back home from my job for few days, I made an upgrade of Export > Raster (sextante) to image file. > I attached on this mail (still problems with Eclipse on Ubuntu, sorry > :-( .....). > What are the news: > - No need of commons-sanselan. It uses commons-imaging embedded into > newer OJ NB > - It saves to Jpeg2000 using imageIO > - It saves to Golden Software surfer ver 6 (.grd) - I added this option > as this format is still popular in Italy (see code into > SaveImageToRasterPlugIn.java) > - It saves to XYZ file (see code into SaveImageToRasterPlugIn.java) > - The plugin is available on Raster>Tools menu > > I ask Stefan or other if they can committed SVN sources as I cannot do. > Thanks. > Source code of the plugin is embedded into the jar file. > best regards > Peppe > > > 2013/7/22 Stefan Steiniger <sst...@geo.uzh.ch <mailto:sst...@geo.uzh.ch>> > > Hi Peppe, > > yep I found it under this url as well. Problem is: I get asked for a > password. So the download fails...??? > > w.r.t: missing jpg encoder... mhm thats bad :( > > saludos de Chile, > stefan > > Am 22.07.13 13:01, schrieb Giuseppe Aruta: > > Hi Stefan, > > This is the Url where I download common-imagig jar: > > http://maven.acm-sl.org/__artifactory/list/libs-__releases/org/apache/commons/__commons-imaging/1.1-SNAPSHOT/ > > <http://maven.acm-sl.org/artifactory/list/libs-releases/org/apache/commons/commons-imaging/1.1-SNAPSHOT/> > This library seems not to have JPG write support, and OpenJDK > seems not > to have a native JPEG encoder so we probably still need to use > JAI if we > want to have JPEG support. > > Cheers > > Peppe > > > > 2013/7/21 Stefan Steiniger <sst...@geo.uzh.ch > <mailto:sst...@geo.uzh.ch> <mailto:sst...@geo.uzh.ch > <mailto:sst...@geo.uzh.ch>>> > > > Hi Peppe (cc list) > > thanks. I just committed the sources to the svn - plugin > folder. > I am haveing two notes on that: > (a) I could not find the common-imaging lib you used on the > web, so > I replaced it with a nb of common-sanselan > (b) I noticed that there is still a dependencie to JAI when the > color model for imagebuffer is created, using > javax.media.jai.PlanarImage > > I hope to have a look at it again next week. > > cheers, > stefan > > Am 21.07.13 08:23, schrieb Giuseppe Aruta: > > Hi Stefan, > this is the zip file made using Eclipse options > Thanks again for the help. I hope I can go back working > on it in > August. > There are few news and differences comparing to Pirol Save > Raster plugin: > - Export to TIF uses common-imaging lib from Apache, > the others > uses ImageIO > - Exporting the loaded image to another one save the > new file, but > leaves the riginal loaded image into OJ workbench > - Exporting a part of the image (Pirol Tool extract > part in the > fence) > save the new file and loads it into OJ workbench (only with > image IO not > with common-imaging library, this means all except TIF) > - I left on class ImageUtils all the exporting process > (except > save to > ASC, it should be moved there), the idea was to create > a unique > class > for future raster processes/plugin > cheers > Peppe > > > ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel