| [ Return to Bugs & Features | Post Text | Post File | Prev | Next ]
STR #3467
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Image Support |
Summary: | create Fl_File_Icon from embedded image data |
Version: | 1.4-feature |
Created By: | djcj |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]
Trouble Report Comments:
[ Post Text ]
|
#1 | djcj 02:11 Apr 29, 2018 |
| A patch to enable creating an Fl_File_Icon from a PNG/JPEG char array or an Fl_Shared_Image pointer. | |
|
#2 | djcj 02:13 Apr 29, 2018 |
| I've attached an unfinished custom file selection browser for which I wanted this feature. Icons are from Tango, so they're Public Domain. | |
|
#3 | manolo 08:08 Apr 30, 2018 |
| That looks like a very interesting extension proposal.
I would like to suggest a small modification: instead of adding 2 new member functions load_png() and load_jpeg() add load_rgb_image(Fl_RGB_Image*).
That will cover load_png and load_jpeg since these images are derived from class Fl_RGB_Image. That will also cover other sources of Fl_RGB_Image's. One source that may be of interest is the new Fl_SVG_Image.
I have put that in attached Fl_FileIconV2.patch, and give a usage example with attached exampleV2.cpp, slightly modified from example.cpp | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |