Coder Social home page Coder Social logo

Comments (4)

xdanieldzd avatar xdanieldzd commented on September 9, 2024

It looks like the PixelDataFormat enumeration is more or less broken, possibly since its reworking in 715db6f in January, but removing the Flags attribute from it in 4023d3c is what has caused this to manifest. As a temporary workaround, uncomment the attribute again, which might however cause issues with some compressed pixel formats in particular. I'll look into fixing this problem later today.

from scarlet.

darkstar avatar darkstar commented on September 9, 2024

I tried removing the IsValid() check from the ImageBinary and everything worked out well. Problem is that I need to refine my someFlag check as apparently I got it wrong and now almost all images get swizzled ;-) Also, the code is a crappy mess right now anyway so I'll probably rewrite it a few times (this is the .phyre image format I'm talking about... it's awfully badly documented)

Maybe the "IsValid()" check should be changed so that it tests each "group" of the PixelFormat by itself, i.e. test the color channel bits(mask out everything else), then check the PixelOrder (mask out the color channel stuff), etc.?

from scarlet.

darkstar avatar darkstar commented on September 9, 2024

I created a sample of how the IsValid() call could be changed. See PR #17

This should make it work again even without the flags attribute

from scarlet.

xdanieldzd avatar xdanieldzd commented on September 9, 2024

Merged PR #17. I'm also sorry for not actually addressing your PRs over the week, I've honestly been a bit frustrated with this project, and certain things I've been trying with it not working out (namely recreating game-format images from PNGs). I will try to get back into the project over the next couple of days or so.

from scarlet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.