burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.17k stars 992 forks source link

How to add image from drawable rather than gallery? #313

Closed BaniHani closed 3 years ago

basitis commented 3 years ago

@BaniHani Do you mean to add as a main image or as sticker image?

BaniHani commented 3 years ago

as a main image please.

basitis commented 3 years ago

@BaniHani If you have fix drawable then you can directly give to the xml and if you want to load runtime then library is expose "source"(ImageView). You can access something like this:

photoFrameEditorView.source.setImageDrawable(getResources().getDrawable(R.drawable.my_drawable));

basitis commented 3 years ago

@BaniHani If your issue is resolved with my comment then please close this issue. Thanks in advance.