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

BIP2 #14

Merged
merged 11 commits into from
May 3, 2021
Merged

BIP2 #14

merged 11 commits into from
May 3, 2021

Commits on May 1, 2021

  1. Implement BIP2 in converter

    This format can store an arbitrary number of resolutions of the image in one file.
    At the moment we're just doing two though, the first one for icons (32x32), the second for images (full size).
    bonjorno7 committed May 1, 2021
    Configuration menu
    Copy the full SHA
    12e8db0 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2021

  1. Implement BIP2 in loader

    I'm not 100% satisfied with this code, but it does work.
    bonjorno7 committed May 2, 2021
    Configuration menu
    Copy the full SHA
    a5f0436 View commit details
    Browse the repository at this point in the history
  2. Convert example BIP1 files to BIP2

    Well actually I converted them from the original JPG / PNG files, but the result is the same.
    bonjorno7 committed May 2, 2021
    Configuration menu
    Copy the full SHA
    96d9acd View commit details
    Browse the repository at this point in the history
  3. Use size instead of (width, height)

    I think this is a bit more elegant.
    bonjorno7 committed May 2, 2021
    Configuration menu
    Copy the full SHA
    2d7bc54 View commit details
    Browse the repository at this point in the history
  4. Adjust loader code for readability

    Removed some newlines which I felt didn't belong.
    Renamed count to length when talking about (width * height), because that's what I call it elsewhere in the code too, and count refers to the amount of images in a BIP file.
    Updated an assert message that I forgot to update earlier.
    Changed how the data dictionary is used, so now icon_size and icon_pixels are set on its creation, and only overwritten in if the icon needed resizing.
    bonjorno7 committed May 2, 2021
    Configuration menu
    Copy the full SHA
    b0a853c View commit details
    Browse the repository at this point in the history
  5. Use size instead of (width, height) for converter

    I did the same for the loader and I like to be consistent.
    bonjorno7 committed May 2, 2021
    Configuration menu
    Copy the full SHA
    9fe8629 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2021

  1. Use length for read in converter

    Functionally the same but more explicit.
    bonjorno7 committed May 3, 2021
    Configuration menu
    Copy the full SHA
    79d2819 View commit details
    Browse the repository at this point in the history
  2. Add icon example to alpha popup

    Just to show that previews can be used as icons now.
    bonjorno7 committed May 3, 2021
    Configuration menu
    Copy the full SHA
    d7c0ee6 View commit details
    Browse the repository at this point in the history
  3. Add comments to explain RGBa conversion

    This code is a bit opaque otherwise.
    bonjorno7 committed May 3, 2021
    Configuration menu
    Copy the full SHA
    e6849e0 View commit details
    Browse the repository at this point in the history
  4. Add asserts to make sure count > 0

    Interestingly, the loader seems to support BIP2 files with only one resolution, even though it expects two.
    I haven't tested it, but just reading the code, that's how it probably works.
    bonjorno7 committed May 3, 2021
    Configuration menu
    Copy the full SHA
    422b84f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    260e769 View commit details
    Browse the repository at this point in the history