Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  D.Yazel@ Problem ''  (Read 1065 times)
0 Members and 1 Guest are viewing this topic.
Offline aschwalb

Senior Newbie

Java games rock!

« Posted 2004-05-22 07:19:02 »

To use the class '', i must
create a '' -Object.
For that, i also must convert my Texture in a BufferedImage.
Now, many pictures and textures are from type
With that stored type under
'', the
ScribeInputStream fails, because BufferedImages
can not been created back with that type.

Another problem is the method close() (throws an exception) from class ''
after a read. I think there was a closed  stream,
before this method can do this.

Also a problem that occurs is , if i convert an BufferedImage to a texture, the complett texture
was flipped from Bottom to Top.

Before i write the datas to the ScribeOutputStream,
i must call  
I think, with converting the datas from a BufferedImage
to a Texture the used ImageComponent2D flips
the image from Bottom to Top.

// Read in from 'ScribeInputStream in'
int w   = in.readInt();
int h   = in.readInt();  
//Reading in datas, are correct.I have proofed this.  
int[] pixels  = in.readIntArray();
BufferedImage bImage = new BufferedImage( w, h, BufferedImage.TYPE_INT_ARGB );
bImage.setRGB(0, 0, w, h, pixels, 0, w );

Texture2D tex  = (Texture2D) bImage, "RGB", false, Texture.NICEST, Texture.NICEST, Texture.WRAP );

//The next  can flip the Image from Top to Bottom
tex.setImage(0, new ImageComponent2D(ImageComponent.FORMAT_RGBA, w, h, bImage));

Beside that, it is good component !!

Pages: [1]
  ignore  |  Print  

ivj94 (580 views)
2018-03-24 14:47:39

ivj94 (44 views)
2018-03-24 14:46:31

ivj94 (371 views)
2018-03-24 14:43:53

Solater (60 views)
2018-03-17 05:04:08

nelsongames (107 views)
2018-03-05 17:56:34

Gornova (147 views)
2018-03-02 22:15:33

buddyBro (690 views)
2018-02-28 16:59:18

buddyBro (90 views)
2018-02-28 16:45:17

xxMrPHDxx (492 views)
2017-12-31 17:17:51

xxMrPHDxx (728 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!