Boolean263 / EventGhost-TrayTip

EventGhost plugin to show Windows system tray messages.
9 stars 2 forks source link

added icon support #8

Open kdschlosser opened 7 years ago

kdschlosser commented 7 years ago

I figured I would let ya know to be expecting a PR pretty soon.

I am almost done expanding the types of image files that can be used for the plugin

This will be the list of supported image types.

# Already Supported
'EXE',
'DLL',
'ICO',

# Truevision TGA (Targa) image
'TARGA',
'PIX', 
'TGA', 
'ICB', 
'VDA', 
'VST',

# Silicon Graphics Image
'SGI', 
'RGB',
'RGBA', 
'BW', 
'INT', 
'INTA',

#  Microsoft Windows icon file
'ICO', 

# DirectX texture file
'DDS', 

 # X Windows System Bitmap
'XBM',

# X Windows PixMap
'XPM',

# Pixar Image Computer image file 
'PIXAR', 
'PXR',
'PIC',
'PICIO', 

# Bitmap graphic files for Windows and OS/2
'BMP', 
'DIB',

# CompuServe Graphics Interchange File 
'GIF', 

# JPEG/JIFF Image file
'JPE', 
'JPEG', 
'JPG', 
'JFIF', 
'JIF', 

# Portable BitMap image file
'PBM', 

# Portable Greymap file
'PGM', 

# Portable Pixmap file
'PPM', 

# Kodak Photo-CD image file
'PCD', 

# RLE compressed ZSoft PC paintbrush bitmap file
'PCX', 

 # Portable Network Graphics bitmap graphic file
'PNG',

# Tag Image File Format bitmap file
'TIFF',
'TIF', 

 # MAC OS icon
'ICNS',

# Encapsulated PostScript
'EPS', 
'EPSI',
'EPSF', 

# Google image file
'WEBP',

 # Multi Picture Object
'MPO',

#  Image Tools images
'IMT', 

# GIMP Brush
'GBR', 

 # Autodesk animation
'FLI', 
'FLC',

# IBM Fax
'DCX', 

 # Windows Cursor
'CUR',

# SPIDER Image stack
'SPI',

I am working on one kink in the code and it has to deal with loading embedded icons. because of how the current plugin displays the icons when selecting them. Because of the use of the additional file types the Windows built in icon viewer doesn't handle all of the file types. I added a file browse control but the icon viewer also has one as well. and this could be confusing for the user. So I have remove the use of that stock icon viewer and I am grabbing the embedded images directly from the exe or dll and converting the raw data to a bitmap that I add to a choice control with the images displayed in the control. I should hopefully be done with it soon. I believe this will be a nice addition and we will also be able to control the image sizes as well. :D

If there is an image type i missed let me know and I will see if I can add it.

Boolean263 commented 7 years ago

You don't do anything small, do you! 😃 That's quite the list of formats. I imagine the average user would only need JPG, GIF, and PNG, but it's good to have the rest covered, too. Nice work!

I'm sure you're already doing this, but it'd be cool if the code for this were in a separate file/library from __init__.py. I'm sure it's the sort of thing people would want to reuse.

kdschlosser commented 7 years ago

I am not the "only do what is needed to get by" kind of a person. IDK i believe in putting in 100% with everything that you do. because if you aren't then why bother doing it in the first place.

and part of the code is separated into another file. some is not. to much jumping around and to much "voodoo" code could cause a person to lose brain cells trying to figure it out. Kind of like EG in it's present state. I think that having the code spread across something like 15 files to bring up the configuration dialog is a little excessive. also when you hit about the 3rd level of subclass nesting. voodoo magic code. when only print statements work to debug it because the intelligent debugger turned out to not be intelligent enough