Roughsketch / imagesize

Quickly probe the size of various image formats without reading the entire file.
MIT License
57 stars 12 forks source link

Support aseprite #20

Closed rsuu closed 1 year ago

rsuu commented 1 year ago

aseprite header

All sorted in little-endian

0..4    u32    File size
4..6    u16    Magic number (0xA5E0)
6..8    u16    Frames 
8..10   u16    Width in pixels
10..12  u16    Height in pixels
Roughsketch commented 1 year ago

I really appreciate the PR, but I'm not sure if this belongs in a general use library. I've never heard of this format before and it seems to be a custom format for a paid program and not an open standard.

Is there some history of common usage for this format outside the program?

rsuu commented 1 year ago

I really appreciate the PR, but I'm not sure if this belongs in a general use library. I've never heard of this format before and it seems to be a custom format for a paid program and not an open standard.

Is there some history of common usage for this format outside the program?

  1. Aseprite is open source. Build from source: https://github.com/aseprite/aseprite/blob/main/INSTALL.md#compiling

  2. The FLIC animation format was originally developed by Autodesk for use with Autodesk Animator (FLI) and Autodesk Animator Pro (FLC). In 1993 Jim Kent had a Dr. Dobbs article with a source code listing, introducing the FLIC format to the public. ^1

More information: https://github.com/AnimatorPro/Animator-Pro#animator-pro-aka

In GIMP: https://gitlab.gnome.org/GNOME/gimp/-/tree/master/plug-ins/file-fli


But .ase and .flc are a bit different.

The format is much like FLI/FLC files, but with different magic number and differents chunks. ^2

rsuu commented 1 year ago

Just a heads up that although this PR is pretty much fine, I'd appreciate if you could handle some small review changes.

The bigger thing is since #22 was merged your tests will need to be changed slightly. Basically just move test/aseprite into tests/images/aseprite and modify your test paths accordingly.

If for some reason you cannot do this before the next release I have no issue cleaning it up myself so don't feel pressured to do it ASAP. And as always thanks for the PR!

ok, files has been renamed and the code has been removed now.