Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (289)
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  
  Write operations on Windows w/ JAI/JIIO x-png Streams  (Read 689 times)
0 Members and 1 Guest are viewing this topic.
Offline broumbroum

Junior Member





« Posted 2007-11-13 01:56:13 »

hi!
I want to ask to the ix86 users if they have problem with writing images to Streams with the ImageIO-plugins provided at Java Advanced Imaging SDK. I can observe various behaviour with the JAI/JIIO impl on ix86 platforms running wih windows both J2SE 5 and 6. I tested with an Intel Celeron D using a d3d card and an Amd Sempron with integrated graphics chipsets. Celeron D w/ d3d works but Sempron w/ integrated (S3 graphics) chipset doesn't.
More exactly with a code example, the (ImageWriter).write((StreamMetaData), (IIOImage), (WriteParams)) doesn't get in error but the output file is empty with Sempron and integrated graphics chipset. I can't find any explanation of that issue with JAI/JIIO writiing to x-png Streams though it works well when writing to BufferedImages. There's also a mysterious latency with the JFileChooser on some Windows platform, a bug-issue that's already known at Sun... Here's the code sample :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
if (!(data instanceof BufferedImage)) {
                                data = convertToBuffered(data, this);
                            }
                            if(!(data instanceof RenderedImage))
                                throw new IOException("READ/WRITE ERROR : Sprite image isn't compatible with RenderedImage. " + data.getClass().getName());
                            ImageWriter w = getWriter(0);
                            IIOMetadata meta = w.getDefaultImageMetadata(ImageTypeSpecifier.createFromRenderedImage((RenderedImage) data), w.getDefaultWriteParam());
                            w.setOutput(output);
                            waitFor(trackerPty);
                            if (data == null) {
                                throw new NullPointerException("Sprite " + base + " had no data to draw ");
                            }
                            IIOImage iioimage = new IIOImage((RenderedImage) data, null, meta);
                            if (w.canInsertImage(-1)) {
                                w.writeInsert(-1, iioimage, w.getDefaultWriteParam());
                            } else {
                                w.write(meta, iioimage, w.getDefaultWriteParam());
                            }
                            System.out.println("writing is done.");

Can someone give a tip about that issue ? Huh Huh Huh

::::... :..... :::::: ;;;:::™ 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]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Try the Free Demo of Revenge of the Titans

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (60 views)
2013-05-17 21:29:12

alaslipknot (69 views)
2013-05-16 21:24:48

gouessej (99 views)
2013-05-16 00:53:38

gouessej (98 views)
2013-05-16 00:17:58

theagentd (107 views)
2013-05-15 15:01:13

theagentd (98 views)
2013-05-15 15:00:54

StreetDoggy (144 views)
2013-05-14 15:56:26

kutucuk (167 views)
2013-05-12 17:10:36

kutucuk (166 views)
2013-05-12 15:36:09

UnluckyDevil (175 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.141 seconds with 20 queries.