Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  'unable to transform src image' creating texture  (Read 959 times)
0 Members and 2 Guests are viewing this topic.
Offline schizohfer

JGO n00b
*

Posts: 13



« on: 2007-04-06 05:32:52 »


 hi
   i am facing problem creating a texture from an image size 5400 X 5400.
   It gives  ImagingOpException: Unable to transform image . This image is being read from a spatial database.  i tried saving the image as  a jpeg and creating  texture as
          TextureIO.newTexture(new File("img.jpg"));
this work perfectly allright.. i get the problem only when creating the texture from the same image fetched from database. i guess it may be due to the image size , it is not a power of two , but then it works for the same image size read from  a file instead.

any help is appreciated




 
Offline broumbroum

Sr. Member
**

Posts: 384



« Reply #1 on: 2007-04-06 15:02:04 »

you better read the picture from a File thus it will be easier to cache data. I mean there are many ways to load pics in Java, but the File mode still acquires less memory.
You got ImageIO.setUseCache to get File caching while using image streams. Plus you can use the new JAI imageio Streams Channels to buffer data etc.

Hence you should check your code for different ways of loading pictures for your textures BEFORE you can transform them. And it is a good idea to check for a data buffer Manager like the MediaTracker for your renderings in Jogl.

 Smiley

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.078 seconds with 20 queries.