Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert gif images to png format #465

Closed
Phillipus opened this issue Jul 5, 2024 · 13 comments
Closed

Convert gif images to png format #465

Phillipus opened this issue Jul 5, 2024 · 13 comments

Comments

@Phillipus
Copy link
Contributor

GEF uses several gif images -

https://github.com/eclipse/gef-classic/tree/master/org.eclipse.gef/icons
https://github.com/eclipse/gef-classic/tree/master/org.eclipse.gef/src/org/eclipse/gef/internal/icons

Some distributions of Linux might not have support to load gif files. See eclipse-platform/eclipse.platform.swt#1307

Perhaps these could be converted to png format in both standard and @2x sizes? (I don't have the artistic skill to do this)

@azoitl
Copy link
Contributor

azoitl commented Jul 5, 2024

I can give it a try. Especially some of the internal icons would also be available in the platform. Maybe we can take some of theirs and reduce ours.

@ptziegler
Copy link
Contributor

It's still wild to me that projects plan on dropping something as widespread as gifs...

Just as a note: From my experience, pngs tend to be much larger than gifs, unless you crank the compression level to the limit.

I also remember it being possible to request funding from the EF. Perhaps it makes sense to commission a new set of icons instead? Especially since some icons (prominently the cursors) did not age gracefully.
Though I wouldn't even know where to start there...

@azoitl
Copy link
Contributor

azoitl commented Jul 5, 2024

The biggest problem I see with gifs is that AFAIK there is no alpha channel. PNG icons blend here much nicer in and this is a plus for dark mode.

@merks
Copy link
Contributor

merks commented Jul 5, 2024

Yes, there is one "color" that can be 100% transparent, but definitely no alpha.

@azoitl
Copy link
Contributor

azoitl commented Jul 7, 2024

In the last two days I started working on migrating the align icons to pngs and also added 2x versions. Not fully done yet but you can see where it is going here: 5cf918e

I think for most icons I will be able to produce nice versions for the 2024-09 release.

One thing I noticed where pngs are also better is that you can get nicer gradients as png allow full 8 bit rgba colors. This is especially helpful for making icons fitting to the Eclipse UI guidelines.

@Phillipus
Copy link
Contributor Author

@azoitl Thanks! They look good. :-)

azoitl added a commit to azoitl/gef-classic that referenced this issue Jul 15, 2024
As part of this migration the icons where polished, harmonized with
Eclipse UI Guidelines and a 2x version is added.

eclipse-gef#465
azoitl added a commit that referenced this issue Jul 15, 2024
As part of this migration the icons where polished, harmonized with
Eclipse UI Guidelines and a 2x version is added.

#465
azoitl added a commit to azoitl/gef-classic that referenced this issue Jul 18, 2024
As part of this migration the icons where polished, harmonized with
Eclipse UI Guidelines and a 2x version is added.

eclipse-gef#465
azoitl added a commit to azoitl/gef-classic that referenced this issue Jul 19, 2024
As part of this migration the icons where polished, harmonized with
Eclipse UI Guidelines and a 2x version is added.

eclipse-gef#465
ptziegler pushed a commit that referenced this issue Jul 20, 2024
As part of this migration the icons where polished, harmonized with
Eclipse UI Guidelines and a 2x version is added.

#465
ptziegler added a commit to ptziegler/gef-classic that referenced this issue Jul 22, 2024
This adds a 96 and 192DPI version of the back arrow, as well as the
source SVG file from which they were created. In order to dynamically
update the images, the Draw2D FileImageDataProvider is used, rather than
loading the image directly from the classpath.

The image itself has been converted into a static variable, in order to
avoid a resource leak when the back button is removed from the graph
again.

See eclipse-gef#465
ptziegler added a commit to ptziegler/gef-classic that referenced this issue Jul 22, 2024
This converts the following icons to PNG and adds a 192 DPI version for:
- folder_closed
- move_down_disabled
- move_up_disabled
- next_nav
- palette_view
- prev_nam
- zoom_in
- zoom_out

Most of the SVG files have been taken from the Eclipse platform project,
in order to remain consistent with the rest of the IDE.

See eclipse-gef#465
@ptziegler
Copy link
Contributor

ptziegler commented Jul 22, 2024

A quick search resulted in the following list of GIFs that still need to be converted. @azoitl What, if any, icons are you currently working on? Most of the icons belong to the GEF bundle and I'd like to avoid both of us working on the same files.

  • org.eclipse.gef
    • org/eclipse/gef/internal/icons/
      • add.gif
      • add-disabled.gif
      • arrow16.gif
      • arrow24.gif
      • category.gif
      • customizer_dialog_title.gif
      • folder_closed.gif
      • marquee_nodes16.gif
      • marquee_nodes24.gif
      • marquee_wires16.gif
      • marquee_wires24.gif
      • marquee16.gif
      • marquee24.gif
      • move_down_disabled.gif
      • move_up_disabled.gif
      • next_nav.gif
      • palette_layout.gif
      • palette_left.gif
      • palette_right.gif
      • palette_view.gif
      • pin_view.gif
      • pinned.gif
      • prev_nav.gif
      • separator.gif
      • style_bold.gif
      • style_italic.gif
      • style_paragraph_center.gif
      • style_paragraph_left.gif
      • style_paragraph_right.gif
      • style_paragraph_rtl.gif
      • style_underline.gif
      • unpinned.gif
      • zoom_in.gif
      • zoom_out.gif
    • org/eclipse/gef/ui/stackview/icons
      • NORED.gif
      • REDOGRN.gif
      • stackDebug.gif
      • UNDOGRN.gif
      • YESGRN.gif
    • org/eclipse/gef/ui/console/icons
      • debugClear.gif
      • debugDND.gif
      • debugEditParts.gif
      • debugEvents.gif
      • debugFeedback.gif
      • debugGEF.gif
      • debugGlobal.gif
      • debugPaint.gif
      • debugStates.GIF
      • debugTools.gif
    • icons
      • palette_view.gif
  • org.eclipse.zest.core
    • icons
      • back_arrow.gif

ptziegler added a commit to ptziegler/gef-classic that referenced this issue Jul 22, 2024
This converts the following icons to PNG and adds a 192 DPI version for:
- folder_closed
- move_down_disabled
- move_up_disabled
- next_nav
- palette_layout
- palette_view
- prev_nam
- zoom_in
- zoom_out

The following icons are not used and have been removed:
- palette_left
- palette_right

Most of the SVG files have been taken from the Eclipse platform project,
in order to remain consistent with the rest of the IDE.

See eclipse-gef#465
azoitl pushed a commit that referenced this issue Jul 22, 2024
This converts the following icons to PNG and adds a 192 DPI version for:
- folder_closed
- move_down_disabled
- move_up_disabled
- next_nav
- palette_layout
- palette_view
- prev_nam
- zoom_in
- zoom_out

The following icons are not used and have been removed:
- palette_left
- palette_right

Most of the SVG files have been taken from the Eclipse platform project,
in order to remain consistent with the rest of the IDE.

See #465
@azoitl
Copy link
Contributor

azoitl commented Jul 22, 2024

I just experimented with the paragraph style icons. I would like to try looking into the marque select icons. But there I'm not yet sure which gradient to use.

@ptziegler
Copy link
Contributor

But there I'm not yet sure which gradient to use.

To get the colors right, I usually have the original GIF open in GIMP and then take the colors via the Color Picker. So for the marquee icons, the outer rectangle in e.g. marquee16.gif, the gradient start with #09569f at the bottom and end with #8f7728 at the top.

@azoitl
Copy link
Contributor

azoitl commented Jul 23, 2024

But there I'm not yet sure which gradient to use.

To get the colors right, I usually have the original GIF open in GIMP and then take the colors via the Color Picker. So for the marquee icons, the outer rectangle in e.g. marquee16.gif, the gradient start with #09569f at the bottom and end with #8f7728 at the top.

My point was more about what colors to use. I have the feeling that in respect to the (Eclipse UI guidelines)[https://eclipse-platform.github.io/ui-best-practices/#design] the current colors seems a bit of.

@azoitl
Copy link
Contributor

azoitl commented Jul 23, 2024

By now I have svgs of the marquee icons. I must admit working with inkscape has its advantages. Really like it.
No I only have to correctly generated the 4 pngs I need for the tools. but we are getting there.

ptziegler added a commit to ptziegler/gef-classic that referenced this issue Jul 23, 2024
This creates SVG files for the plug/tree cursors and also the shared
arrow icons, resulting in much smoother sides.

Following icons are affected:
- arrow16
- arrow24
- plug-cursor
- plugnot-cursor
- tree_add-cursor
- tree_move-cursor

See eclipse-gef#465
ptziegler added a commit to ptziegler/gef-classic that referenced this issue Jul 23, 2024
This creates SVG files for the plug/tree cursors and also the shared
arrow icons, resulting in much smoother sides.

Following icons are affected:
- arrow16
- arrow24
- plug-cursor
- plugnot-cursor
- tree_add-cursor
- tree_move-cursor

See eclipse-gef#465
@azoitl
Copy link
Contributor

azoitl commented Jul 23, 2024

The code which uses the images from org.eclipse.gef.ui.console.icons is deprecated. I don't think it is worth the effort to redo this icons.
Should we mark that API for removal in the second next release?

The same holds for the icons in org.eclipse.gef.ui.stackview.icons.

@ptziegler
Copy link
Contributor

ptziegler commented Jul 23, 2024

I noticed that as well and agree. It's not really worth the effort refactoring them when they shouldn't be used in the first place. I'm not even sure if both still work, in the first place...

azoitl added a commit to azoitl/gef-classic that referenced this issue Jul 25, 2024
azoitl pushed a commit that referenced this issue Jul 26, 2024
This adds a 96 and 192DPI version of the back arrow, as well as the
source SVG file from which they were created. In order to dynamically
update the images, the Draw2D FileImageDataProvider is used, rather than
loading the image directly from the classpath.

The image itself has been converted into a static variable, in order to
avoid a resource leak when the back button is removed from the graph
again.

See #465
azoitl added a commit to azoitl/gef-classic that referenced this issue Aug 9, 2024
azoitl added a commit to azoitl/gef-classic that referenced this issue Aug 16, 2024
Several icons where reworked:
  - text styles
  - add
  - pinned / unpinned
  - separator
  - customizer_diolog_title

See eclipse-gef#465
ptziegler pushed a commit that referenced this issue Aug 17, 2024
Several icons where reworked:
  - text styles
  - add
  - pinned / unpinned
  - separator
  - customizer_diolog_title

See #465
azoitl added a commit to azoitl/gef-classic that referenced this issue Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants