Hi,

I have been using OIIO on Linux and it has been working great. Thank you
for making it!

Now I am building my application on Windows and ran into a problem reading
images.

I built OIIO version 2.1 with MSVC2017 x64.

Trying to read a JPG I get:

Invalid image file "C:\Users\till\Desktop\azul.jpg": JPEG error: Not a JPEG
file: starts with 0xff 0xe1


Reading a PNG gives me:

libpng error: Not a PNG file

Invalid image file "C:\Users\till\Desktop\azul.png": PNG read error: Not a
PNG file


Reading a TIF image works fine though.


Here is my test code:

shared_ptr<ImageBuf> inputImage (new ImageBuf());

inputImage->init_spec("C:\\Users\\till\\Desktop\\azul.jpg", 0, 0);

bool ok = inputImage->read(0, 0, TypeDesc::FLOAT);

if (!ok)

{

    cout << "There was a problem reading the image." << endl;

    cout << inputImage->geterror() << endl;

}

else
{

    cout << "Image read successfully." << endl;

}

I tried different images to make sure I am not using corrupt ones.

Any idea what could be causing this or where I am going wrong?

Here are the offending binaries: https://github.com/ttddee/oiio-msvc2017

Thank you!

Till
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to