Commit Graph

5 Commits

Author SHA1 Message Date
459cb3ec5b libimg: Improve support of transparent PNG images.
* Support grayscale images with alpha channel.
* Support rgb images with transparent color.
* Process 'tRNS' chunk (simple transparency).

Transparent png images were already supported for color type 6, which
is RGBA. Now indexed images (color type 3) can also have transparency
via 'tRNS' chunk data.

git-svn-id: svn://kolibrios.org@8449 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-12-18 22:08:51 +00:00
201cf02d85 libimg: transparency fixes.
img.convert doesn't make opaque pixels transparent.
gif decoder considers palette pixels opaque.

git-svn-id: svn://kolibrios.org@8394 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-12-13 17:22:19 +00:00
6cf659fe71 libimg: add img.from_file, refactor img.convert.
Add new function, img.from_file: gets file name and returns decoded Image.
Make img.convert code less spaghetti: use jump table, not a chain of jmp's.


git-svn-id: svn://kolibrios.org@7105 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-10-31 21:33:52 +00:00
741b6ad89c img.scale and img.convert fix for multiframe images
new function: img.get_scaled_size


git-svn-id: svn://kolibrios.org@6807 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-12-22 23:29:25 +00:00
9e218440da add convert.asm (fix previous revision)
git-svn-id: svn://kolibrios.org@3056 a494cfbc-eb01-0410-851d-a64ba20cac60
2012-11-18 16:12:36 +00:00