Search Unity

Bug LoadImage() loads a 1200x1800 image as 8x8

Discussion in 'General Graphics' started by Logopolis, Sep 14, 2020.

  1. Logopolis

    Logopolis

    Joined:
    Feb 18, 2015
    Posts:
    27
    When I use ImageConversion.LoadImage() (or Texture2D.LoadImage()) to load the attached 1200x1800 jpeg image file into a Texture2D, the load succeeds but the texture's width and height are both set to 8. I've only seen this problem occur with this one image. The image was saved out by Photoshop and has no trouble being displayed in any other program I've tried. When I load it into Gimp and re-save it out, the resulting copy of the image loads fine into Unity.

    Any idea why this is happening? It's easy enough to get around for this one image, but I'll be allowing users to upload images and don't want to give them a feature that fails randomly. I'm using Unity 2019.4.7f1.

    test_image.jpg
    Image link: http://ironzog.com/test_image.jpg