You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I just downloaded your linked image, and it reads just fine using code similar to your snippet.
public static void main(String[] args) throws IOException {
URL url = new URL(args[0]);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
//image is null, i.e. read failed
BufferedImage image = ImageIO.read(conn.getInputStream());
System.err.println("image: " + image);
JPEGImageReader.showIt(image, "image"); // NON-API, just to show the contents looks good
}
How annoying ;) After doing some further digging it looks like i was getting the image from a CDN node (where the image was corrupted). If I used a VPN endpoint in a different country the above worked ok.
Many kind thanks for the v.quick response and apologies that I didn't think of trying this before posting.
I have another problematic JPEG, although I assume a different problem to the one I reported in issue #22:
I am unable to load the following JPEG, source : http://static.lexpress.fr/medias_9804/w_1970,h_1478,c_crop,x_0,y_0/w_605,h_350,c_fill,g_north/v1409117471/un-nouveau-record-du-chomage-en-france-comme-cadeau-de-bienvenue-manuel-valls-a-prevenu-des-mardi-que-les-chiffres-de-juillet-que-pole-emploi-devoile-mercredi-au-lendemain-de-la-nomination-du-nouveau-gouvernement-ne-seraient-pas-bons_5019824.jpg
Code snippet:
I have both the following dependencies confirmed as loaded:
I have several example of images from the same website that suffer from this problem. Any help with this type of image would be greatly appreciated.
The text was updated successfully, but these errors were encountered: