About Store Forum Documentation Contact



Post Reply 
Solved: Import PNG or JPG image and draw
Author Message
Houge Offline
Member

Post: #1
Solved: Import PNG or JPG image and draw
1. Create PNG or JPG image on disk
2.
Code:
Image image;
image.ImportTry("path-to-png.png");
3.
Code:
image.drawFs();

Nothing is drawn. GFX images are drawn just fine.

UPDATE1:

Works with
Code:
image.ImportTry("path-to-png.png", IMAGE_B8G8R8A8, IMAGE_2D);

Need to use IMAGE_2D, otherwise not working. Is it OK?
(This post was last modified: 09-08-2016 05:42 AM by Houge.)
09-07-2016 06:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Bug? Import PNG or JPG image and draw
yes, default import for those formats is IMAGE_SOFT
09-08-2016 01:46 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #3
RE: Solved: Import PNG or JPG image and draw
Ok, thanks for clarification, it seems like i just never loaded PNG/JPG from disk before grin
09-08-2016 05:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply