Giter Club home page Giter Club logo

Comments (4)

generalmimon avatar generalmimon commented on July 26, 2024 1

@gfcwfzkm:

I haven't looked into their code output of the PIF format in detail, it seems to parse the file correctly but lack RLE-support to decode the data straight away.

That's OK - it's not meant to decode the pixel data. It just takes care of the metadata and the color table, which is already quite useful, and this is where PIF differs from other image formats. After the metadata is parsed, decoding the actual pixels is relatively simple - in some cases, you can pass the entire bitmap to an existing image manipulation library (if it uses a common pixel format like RGB888) and it's not so hard to do it manually, either - probably just 1-2 for loops with some ifs.

A better support for bitmaps in Kaitai Struct has been proposed (kaitai-io/kaitai_struct#188) and would be nice to have. Although it's probably possible to fully describe all the pixels using user-defined types in Kaitai Struct already now, in practice it's not a very good idea, because it would be a very time- and memory-inefficient (one class instance per pixel or even color component) and a user of the parser would still have to iterate the pixel objects and translate them into a more useful representation of a bitmap, so it wouldn't really save much work either.

from pif-image-format.

armijnhemel avatar armijnhemel commented on July 26, 2024 1

Thanks for informing me about this. I didn't know such a neat tool like Katai Struct existed! I haven't looked into their code output of the PIF format in detail, it seems to parse the file correctly but lack RLE-support to decode the data straight away. Still a solid point if someone wants to get started with it, I'd say.

I sent it so if you want you can include it in the README :-)

from pif-image-format.

gfcwfzkm avatar gfcwfzkm commented on July 26, 2024 1

@armijnhemel
Thanks, I'll definitely add it to the README! :)

@generalmimion
So there is progress towards fully reading bitmap data! That would make it quite the allround-tool for quick and easy image decoding capabilities (next to the already impressive feature set).

from pif-image-format.

gfcwfzkm avatar gfcwfzkm commented on July 26, 2024

Thanks for informing me about this. I didn't know such a neat tool like Katai Struct existed!
I haven't looked into their code output of the PIF format in detail, it seems to parse the file correctly but lack RLE-support to decode the data straight away. Still a solid point if someone wants to get started with it, I'd say.

from pif-image-format.

Related Issues (5)

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.