3 ms·
Not the parent so I can’t tell you exactly what he did, but some suggestions: - The PNG specification contains plenty of information including width and length
by Jorge1o1 4y ago
Not the parent so I can’t tell you exactly what he did, but some suggestions:
- The PNG specification contains plenty of information including width and length that allow you to use 2d arrays rather than ArrayLists
- The RGBA 32bit integer doesn’t need to be unpacked.. you can just perform shifts and transformations of each of the 8bit channels.
- If you do unpack, you should use native 8bit unsigned ints
- You don’t need an unmodified copy.. that’s your file
- Undo stack should contain deltas, not the whole image over and over again.
Edit: formatting