mstandio / SaladoConverter

GUI for tools provided with PanoSalado - open source flash panorama viewer
http://panozona.com
28 stars 5 forks source link

Panoramas with more than MAX_INT pixels (per wall) #2

Open kaefert opened 11 years ago

kaefert commented 11 years ago

It took me quite some time to figure out how to stich a panorma of this size with hugin + enblend (see https://bugs.launchpad.net/enblend/+bug/685105 ), but now I managed to get an equirectangular panorama with the dimensions of 240.000 x 8.292 pixels. I've used gimp to make an incredible 240.000 x 120.000 pixels sized tiff out of that (since SaladoConverter won't accept an input that is not 2:1) and tried to convert it to an deep zoom cubic panorma with Salado Converter, but sadly, this failed:

~/Pictures/SaladoConverter-0.5$ java -Xmx32768m -jar components/EquirectangularToCubic.jar -verbose "/home/kaefert/Pictures/SaladoConverter-0.5/input/" Processing image: /home/kaefert/Pictures/SaladoConverter-0.5/input/2013-10-15_2111_240k_2.tif java.lang.IllegalArgumentException: Dimensions (width=76396 height=76396) are too large at java.awt.image.SampleModel.(Unknown Source) at java.awt.image.SinglePixelPackedSampleModel.(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown Source) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source) at java.awt.image.BufferedImage.(Unknown Source) at equirectangulartocubic.EquirectangularToCubic.processImageFile(EquirectangularToCubic.java:310) at equirectangulartocubic.EquirectangularToCubic.main(EquirectangularToCubic.java:155)

Do you think there is a way around this? From what I understand, you are trying to create one of the cube walls, but the java.awt.image toolset does not allow pictures with more than 2^31 pixels, so for quadratic pictures no more than 46340 x 46340 pixels.

So the biggest panorama that can be converted by SaladoConverter at the moment is probably of the size 185362 x 92681 pixels (or something like that)

kaefert commented 11 years ago

hmm, now I tried with a 100.000 x 50.000 sized tif panorama, but it also failed, GUI fails the same way.

kaefert@ultrablech:~/Pictures/SaladoConverter-0.5$ java -Xmx32768m -jar components/EquirectangularToCubic.jar -verbose "/home/kaefert/Pictures/SaladoConverter-0.5/input/" Processing image: /home/kaefert/Pictures/SaladoConverter-0.5/input/2013-10-15_0831_newhugin_100k_salado-input.tif Reading wall 1 of 6: 1% ... Reading wall 1 of 6: 100% Saving image...Error: One factory fails for the operation "encode" Occurs in: javax.media.jai.ThreadSafeOperationRegistry java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122) at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674) at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473) at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332) at com.sun.media.jai.opimage.FileStoreRIF.create(FileStoreRIF.java:138) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122) at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674) at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473) at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332) at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819) at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867) at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888) at javax.media.jai.JAI.createNS(JAI.java:1099) at javax.media.jai.JAI.create(JAI.java:973) at javax.media.jai.JAI.create(JAI.java:1621) at equirectangulartocubic.EquirectangularToCubic.saveImage(EquirectangularToCubic.java:402) at equirectangulartocubic.EquirectangularToCubic.processImageFile(EquirectangularToCubic.java:319) at equirectangulartocubic.EquirectangularToCubic.main(EquirectangularToCubic.java:155) Caused by: java.lang.NegativeArraySizeException at java.awt.image.DataBufferByte.(Unknown Source) at java.awt.image.ComponentSampleModel.createDataBuffer(Unknown Source) at java.awt.image.Raster.createWritableRaster(Unknown Source) at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:173) at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:151) at com.sun.media.jai.opimage.EncodeRIF.create(EncodeRIF.java:70) ... 26 more Error: One factory fails for the operation "filestore" Occurs in: javax.media.jai.ThreadSafeOperationRegistry java.lang.reflect.InvocationTargetException ... error repeats several times ...

kaefert commented 11 years ago

The same error that I've posted in the comment above also happened with a 86.000 x 43.000 file, the biggest panorama I have successfully converted into a cube with SaladoConverter yet was 75.692 x 37.846 pixels.