Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PSD Thumbnail is black #3660

Closed
DougRogers opened this issue Nov 11, 2022 · 1 comment · Fixed by #3668
Closed

[BUG] PSD Thumbnail is black #3660

DougRogers opened this issue Nov 11, 2022 · 1 comment · Fixed by #3668

Comments

@DougRogers
Copy link

DougRogers commented Nov 11, 2022


    ImageSpec config;
    config["oiio:UnassociatedAlpha"] = 1;
    bool success                     = false;
    auto inp                         = ImageInput::open(filePath.toStdWString(), &config);
    if (inp)
    {
        const ImageSpec &spec = inp->spec();

        ImageBuf thumb;

        inp->get_thumbnail(thumb, 0);
        if (thumb.initialized())
        {
            // data is all zero
      }
   ...

https://www.dropbox.com/s/g5pde4djl2nfcuk/_DSC0725.zip

@lgritz
Copy link
Collaborator

lgritz commented Nov 14, 2022

Fixed by #3668 (and, that solution in turn also needs a separate bug fix from #3666)

lgritz added a commit that referenced this issue Nov 16, 2022
Fixes #3660

In investigating this issue, I also noticed that now that IOProxy
support can be relied on, the old code that in the psd reader that
directly fumbles with libjpeg is not needed and can be replaced by
just a couple of lines to make an ImageBuf read from an IOProxy.

And it fixes the bug, too. So I'm not even going to try to figure
out what was going wrong with the old code.
lgritz added a commit to lgritz/OpenImageIO that referenced this issue Nov 19, 2022
…n#3668)

Fixes AcademySoftwareFoundation#3660

In investigating this issue, I also noticed that now that IOProxy
support can be relied on, the old code that in the psd reader that
directly fumbles with libjpeg is not needed and can be replaced by
just a couple of lines to make an ImageBuf read from an IOProxy.

And it fixes the bug, too. So I'm not even going to try to figure
out what was going wrong with the old code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants