Error in wps response

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
The response was an empty image....
I tested a part of code in java class separately .... but ImageIo returned a
null image...
so it seems ImageIO can not read image correctly...

public class Image {
        public static void main(String[] args) {
                // TODO Auto-generated method stub
               
                RenderedImage  image1;
                RenderedImage  image2;
                ArrayList<RenderedImage> images = new ArrayList<RenderedImage>();
                try {
                        File img1 = new File("D:\\5-DATA\\aks.tif");
                        File img2 = new File("D:\\5-DATA\\UAV\\50m\\IMG_0485_2.tif");
                        image1 = ImageIO.read(img1);
                        image2 = ImageIO.read(img2);
                        images.add(0, image1);
                        images.add(1, image2);
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                System.out.println(images);

        }

}

------> console: [null, null]




--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
Well, it works with the image you attached (IMG_0485_1.tif). Are those other
images any different from that?



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
This post was updated on .
In reply to this post by BenjaminPross
No, it is exactly the same as you have....
I don't know why it has returned null....
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
what ImageIO plugin you use in eclipse? (which jar file)
did you used jar or (build source code) ?



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
I use javax.imageio.ImageIO that comes with the JRE. I am using JDK
1.8.0_102.



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
12