bugGNU Octave - Bugs: bug #37062, hi-res icon

 
 

bug #37062: hi-res icon

Submitter:  Ben Abbott <bpabbott>
Submitted:  Thu 09 Aug 2012 06:36:02 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Ben Abbott Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 18 Feb 2015 05:23:35 AM UTC, comment #36: 

This is finally done:

http://hg.savannah.gnu.org/hgweb/octave/rev/1687269e31e4

Building from hg now requires rsvg-convert and icotool, at least for the `make dist` target. Icons are included in the source tar, so users of the source distribution won't see any change.

Mike Miller <mtmiller>
Group Member
Wed 04 Feb 2015 05:06:38 AM UTC, comment #35: 

@Mike: Do you want to take this issue back up on the octave-maintainers list?  The number of requirements to build Octave from source is already long, so maybe adding icotool and rsvg-convert are not so bad.

Rik <rik5>
Group administrator
Tue 15 Jul 2014 07:01:48 PM UTC, comment #34: 

Yes, this would be worth addressing for the 4.0 GUI release, not for any 3.8.x patch releases.

I've left this dormant for too long with my working patch (now needs to be updated), I will take this to the maintainers list to ask for objections to the new additional build-dependencies to generate the necessary icons from the SVG source.

Mike Miller <mtmiller>
Group Member
Tue 15 Jul 2014 06:06:19 PM UTC, comment #33: 

is this being targeted for version 4.0 only?
recent builds still lack the hi-res icons.
improved pngs have already been generated.
thanks

Felipe G. Nievinski <fgnievinski>
Wed 22 Jan 2014 05:42:31 AM UTC, comment #32: 

Here is a first attempt at a patch to build the PNG and Windows icons from the SVG source. This unfortunately requires that icotool and rsvg-convert become maintainer tools for anyone building from mercurial, and make dist will error if those programs are not detected.

Also adds an install rule to install PNG and SVG icons under the freedesktop standard icon installation directories, under the names octave.png and octave.svg rather than octave-logo.

Work in progress, there are probably some rough corners left, may need some more conditionals around the build rules, but it works in my test environment where I do have the required tools. Please test if you can, criticize, suggest other ways we can do this.

(file #30334)

Mike Miller <mtmiller>
Group Member
Tue 21 Jan 2014 10:35:41 PM UTC, comment #31: 

Linux definitely wants the same logo name ("octave-logo.png") installed in differently named directories.  This shouldn't be too much of a problem because there is already an install-data-local target in Makefile.am that can be expanded to generate and install each file into the correct directory.

Rik <rik5>
Group administrator
Tue 21 Jan 2014 01:12:08 PM UTC, comment #30: 

The png files look good on MacOS X.  I haven't tried to create an MacOS X icon file with them yet.  There are instructions at the link below.

https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html


Ben Abbott <bpabbott>
Group Member
Tue 21 Jan 2014 12:29:45 PM UTC, comment #29: 

both ico look good, thanks for making these.

I think linux expects the pngs in separate directories named after each image size, e.g., "10x10", and possibly with the same filename, e.g., "octave-logo.png".

Felipe G. Nievinski <fgnievinski>
Tue 21 Jan 2014 04:02:28 AM UTC, comment #28: 

Yes, really. We need to be able to build all files with free tools, whether or not we check them in to the repository. And having build rules for generating the files automatically means no one has to remember or figure out how to do it next time.

Here's my rebuttal zip file of icons, do these look good to you (Felipe and Ben) on Windows and MacOS? Also I don't know what the difference is between the two kinds of ico files generated by the two icotool commands, with or without the --raw option (man page says "raw PNG (Vista icons)"). Any ideas? Obviously the "raw" icon is smaller, will they both work for all versions of Windows we care about?

Here's the script I used to generate the files (also included in the zip file):


#!/bin/sh

icons=
rsvg-convert -h 1024 -w 1024 octave-logo.svg > octave-logo-1024.png
rsvg-convert -h 512 -w 512 octave-logo.svg > octave-logo-512.png
for size in 256 128 96 64 48 32 24 22 20 16 14 10 8; do
  rsvg-convert -h $size -w $size octave-logo.svg > octave-logo-$size.png
  icons="$icons octave-logo-$size.png"
done
icotool -c $icons > octave-logo1.ico
icotool -c --raw $icons > octave-logo2.ico


Jwe, if you are ok with additional maintainer build-dependencies on the rsvg-convert and icotool programs, I can work up a patch to integrate this into the make rules and include the generated icons in the dist tarball. Inkscape is another alternative, it can be run in batch mode without a DISPLAY, but I figured rsvg-convert is much smaller and has fewer dependencies.

(file #30327)

Mike Miller <mtmiller>
Group Member
Mon 20 Jan 2014 05:50:24 PM UTC, comment #27: 

@Mike, I used an interactive app called "GIF Movie Maker" that also does ico files.  I guess if you guys insist on a scriptable solution, ImageMagick has this tutorial <http://www.imagemagick.org/Usage/thumbnails/#favicon>.  But really...

Felipe G. Nievinski <fgnievinski>
Mon 20 Jan 2014 06:27:28 AM UTC, comment #26: 

I'm with you, I don't know what the appropriate commands should be, maybe others have ideas. ImageMagick convert and GraphicsMagick gm convert come to mind, but gm as packaged by most distributions can't handle the color depth of the Octave logo as we know.

Mike Miller <mtmiller>
Group Member
Mon 20 Jan 2014 05:53:52 AM UTC, comment #25: 

I'd really rather not commit generated files to the hg archive.

Is there really no way that we can add rules to the build system to automate this task?

John W. Eaton <jwe>
Group administrator
Sun 19 Jan 2014 08:01:58 PM UTC, comment #24: 

Thanks for all the information guys. I am able to create the PNG files from the SVG file with inkscape's Export tool, files are comparable to those in Felipe's zip archive. I still don't know how to create the ICO file.

@Felipe, I agree, there are lots of important things to fix, but at the very least there should be a README describing that the SVG is the master file to be edited and how the other files were created from it. Can you describe how to create the ICO file from the PNG files? So we have something to refer to five years from now :) I just ran "icotool --create octave-logo*.png > foo.ico" and I get a file 4 times larger than yours.

Should we commit these to the repository with file names like doc/icons/octave-logo-NNN.png? Should we create make install rules to install all icons under ${datadir}/icons/hicolor/NNxNN/octave-logo.png and ${datadir}/icons/hicolor/scalable/octave-logo.svg?

Mike Miller <mtmiller>
Group Member
Fri 17 Jan 2014 08:47:53 PM UTC, comment #23: 

For MacOS X, we need 16, 32, 128, 256, & 512.  Felipe's attachment includes all of those.

Ben Abbott <bpabbott>
Group Member
Fri 17 Jan 2014 08:19:23 PM UTC, comment #22: 

> I also don't know about MacOS, but according to Ben's earlier comments it wants a 512 PNG with transparency.
it's included in file #30303

> Felipe, I think you mentioned on the other report, but what tools did you use to generate the attached ico file? It's important that we can build or edit all of Octave's files with free (libre) software.
Originally I used the online tool ConvertICO.org -- it was the fastest way of doing it.
later I used Inkscape to obtain PNGs from the SVG.

> Felipe, are you saying that Windows will not support just a plain PNG file as an icon? That was Rik's question in comment #18.
AFAIK Windows only supports the .ico format.

> In Debian of course we'd like to see the preferred form distributed, which we do have now.

> It would be nice to have build rules to automatically generate all additional formats from the original source also.
IMHO, not worth automatizing something you'll only see every five years or so.

> If the tools are not readily available or easily scriptable, then we can have the situation we have now, with multiple formats in the repository and a manual (documented somewhere?) process for updating them.
I think a simple README would do for now:

The original SVG logo was converted to PNGs at different resolutions using Inkscape, manually.

There are far more important bugs...

> As far as installation on Linux, Rik's comment #18 is absolutely correct, except I don't think we really need to provide all possible sizes in the complete set. The latest revision of the freedesktop icon spec recommends that 48x48 should be provided at a minimum. I suspect the latest DEs and WMs are supporting SVGs so we could get away with maybe just the SVG and a 48 PNG and a 512 PNG rasterized from the SVG.

these are all included in file #30303 -- it's simpler to offer possibly more than necessary, as files are tiny.

> Plus whatever format Windows wants, if it has to be different, and leave that to the MXE installer build to figure out how to handle it.

just copy the ico;  no need to change the mxe at all.

Felipe G. Nievinski <fgnievinski>
Fri 17 Jan 2014 07:47:40 PM UTC, comment #21: 

I also don't know about MacOS, but according to Ben's earlier comments it wants a 512 PNG with transparency.

Felipe, I think you mentioned on the other report, but what tools did you use to generate the attached ico file? It's important that we can build or edit all of Octave's files with free (libre) software.

Felipe, are you saying that Windows will not support just a plain PNG file as an icon? That was Rik's question in comment #18.

In Debian of course we'd like to see the preferred form distributed, which we do have now. It would be nice to have build rules to automatically generate all additional formats from the original source also. If the tools are not readily available or easily scriptable, then we can have the situation we have now, with multiple formats in the repository and a manual (documented somewhere?) process for updating them.

As far as installation on Linux, Rik's comment #18 is absolutely correct, except I don't think we really need to provide all possible sizes in the complete set. The latest revision of the freedesktop icon spec recommends that 48x48 should be provided at a minimum. I suspect the latest DEs and WMs are supporting SVGs so we could get away with maybe just the SVG and a 48 PNG and a 512 PNG rasterized from the SVG. Plus whatever format Windows wants, if it has to be different, and leave that to the MXE installer build to figure out how to handle it.

Mike Miller <mtmiller>
Group Member
Fri 17 Jan 2014 06:38:06 PM UTC, comment #20: 

form what I could garner based on:

http://www.visualpharm.com/articles/icon_sizes.html
http://stackoverflow.com/questions/3236115/which-icon-sizes-should-my-windows-applications-icon-include
http://msdn.microsoft.com/en-us/library/aa511280.aspx#size

this would be an exhaustive list:

8x8
10x10
14x14
16x16
20x20
22x22
24x24
32x32
48x48
64x64
96x96
128x128
256x256
512x512
1024x1024
scalable

I've exported the PNGs, each one directly based on the SVG.
I've also remade the Windows .ico file, including all PNGs up to and including 128x128.

I'm not sure how iOS will find these files...

(file #30303)

Felipe G. Nievinski <fgnievinski>
Fri 17 Jan 2014 05:56:59 PM UTC, comment #19: 

for Windows all the frames at different width are contained in a single .ico file, which Windows is able to pick the right one.

so at least for windows, octave/share/octave/3.8.0/imagelib/octave-logo.ico can be replaced with the one just submitted.

Felipe G. Nievinski <fgnievinski>
Fri 17 Jan 2014 05:49:04 PM UTC, comment #18: 

This is an easy request.  I think a valid question is how these icons should be presented.  Maybe Mike, or someone else, can comment on haw a packager like Debian would like to see them.

If I go to /usr/share/icons and pick an icon theme directory I find the following subdirectories


8x8
16x16
22x22
32x32
64x64
128x128
256x256
512x512
scalable


The smallest category (8x8) is only used for emblems.  All the other sizes have application icons.  So it would seem worthwhile to create the Octave logo in sizes 16-512 and move the svg icon into a scalable directory.  Do we need to provide the icon in both png and ico formats or can Windows machines now use png?


Rik <rik5>
Group administrator
Fri 17 Jan 2014 05:08:54 PM UTC, comment #17: 

it's all there -- pls see screenshot.


Felipe G. Nievinski <fgnievinski>
Fri 17 Jan 2014 05:03:03 PM UTC, comment #16: 

I thought we wanted higher resolution bitmaps.  The one at https://savannah.gnu.org/bugs/download.php?file_id=30300 appears to me to be 16x16.

John W. Eaton <jwe>
Group administrator
Fri 17 Jan 2014 04:45:20 PM UTC, comment #15: 
Felipe G. Nievinski <fgnievinski>
Fri 17 Jan 2014 02:37:34 PM UTC, comment #14: 

Re-assigning to any OS since both MacOS and Windows want higher resolution icons now. Possibly some Linux window managers that can't handle SVG icons as well.

Mike Miller <mtmiller>
Group Member
Mon 13 Aug 2012 03:37:11 PM UTC, comment #13: 

Using GraphicsMagick 1,2,14 the blue
shading looks OK.  But, it set the background to
white?

Seems safer to provide svg's and a selection
of png pixel sizes.

Michael Godfrey <godfrey>
Group Member
Mon 13 Aug 2012 03:14:33 PM UTC, comment #12: 

As an afterthought, it would be nice to store the Octave sombrero logo also in svg format and produce raster versions only when needed.

Rik <rik5>
Group administrator
Mon 13 Aug 2012 03:09:08 PM UTC, comment #11: 

Theoretically 'convert' from GraphicsMagick can do the conversion.


convert -size 512x512 octave-logo.svg octave-logo.512x512.png


Unfortunately, it doesn't work with my version of GraphicsMagick

GraphicsMagick 1.3.5 2009-01-26 Q8

which doesn't handle the blue color gradient in the logo.  So, it may be better to check in common logo sizes into Mercurial.

Rik <rik5>
Group administrator
Fri 10 Aug 2012 02:52:32 PM UTC, comment #10: 

My guess is that generating a 256x256 or 64x64 icon from the original svg file will give better results than generating the same from a 512x512 bitmap file.

So what sizes are commonly needed?

If possible, these smaller files should be generated automatically as part of the build process instead of being done by hand and checked in to the hg archive so that they will be correct if the original svg file is edited.

John W. Eaton <jwe>
Group administrator
Fri 10 Aug 2012 02:48:03 PM UTC, comment #9: 

I'd like to have the 512x512 version included.  Do we just need the highest resolution or should bitmaps of different sizes by included?

Ben Abbott <bpabbott>
Group Member
Fri 10 Aug 2012 02:43:45 PM UTC, comment #8: 

Should we include these png files in the distribution as a convenience?

John W. Eaton <jwe>
Group administrator
Fri 10 Aug 2012 01:24:49 PM UTC, comment #7: 

I had inkscape around so I made the PNGs in the sizes you requested; I attach the files.


przemek klosowski <przemek>
Thu 09 Aug 2012 08:33:44 PM UTC, comment #6: 

Windows users can't compile C++ code either with default tools, but this doesn't mean that C++ code isn't the preferred form for modification of Octave's binary.

Just install whatever you need in Windows (e.g. gimp or inkscape) and create whatever logo you want from the svg.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Thu 09 Aug 2012 08:28:56 PM UTC, comment #5: 

http://hg.savannah.gnu.org/hgweb/octave/raw-file/tip/doc/icons/octave-logo.svg

There it is.

I suppose that the svg is the "preferred form for modification", so it should be considered the source code, from which you can make your own logo. In that case, it probably should be included in tarballs.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Thu 09 Aug 2012 08:28:48 PM UTC, comment #4: 

Ignore the last part of my prior comment, I found the logo under

share/octave/3.6.1/imagelib

Regardless, Windows can't use an SVG file for an icon (or even open an SVG with default programs).

Tim Eager <teager>
Thu 09 Aug 2012 08:21:49 PM UTC, comment #3: 

Opps ... I forgot to mention that MacOS requires a png with a transparent background.

Can the octave-logo.png (32x32) be replaced by a 512x512 version?

Ben Abbott <bpabbott>
Group Member
Thu 09 Aug 2012 08:17:42 PM UTC, comment #2: 

That path doesn't exist in my windows distribution of 3.6.1, and I can't find any SVG files anywhere else in the distribution, either.

Tim Eager <teager>
Thu 09 Aug 2012 07:12:02 PM UTC, comment #1: 

doc/icons/octave-logo.svg is a resolutionless version of the logo. Is this not enough?

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Thu 09 Aug 2012 06:36:02 PM UTC, original submission:  

Windows 7 requires a 256x256 icon and MacOS requires a 512x512 icon.

Can an Octave icon with a resolution of 512 or higher be added to the sources?

Ben Abbott <bpabbott>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #30334:  make-icons.diff added by mtmiller (4KiB - text/x-patch)
file #30327:  icons-scripted.zip added by mtmiller (205KiB - application/zip)
file #30303:  icons.zip added by fgnievinski (202KiB - application/x-zip-compressed)
file #30302:  Clipboard01.png added by fgnievinski (44KiB - image/png)
file #26343:  logo-256.png added by przemek (13KiB - image/png)
file #26344:  logo-512.png added by przemek (27KiB - image/png)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by fgnievinski (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by przemek (Updated the item)
  • -email is unavailable- added by teager (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by bpabbott (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-18 mtmiller StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2014-01-22 mtmiller Attached File- Added make-icons.diff, #30334
    2014-01-21 mtmiller Attached File- Added icons-scripted.zip, #30327
    2014-01-19 mtmiller CategoryNone Configuration and Build System
        StatusNone In Progress
    2014-01-17 fgnievinski Attached File- Added icons.zip, #30303
    2014-01-17 fgnievinski Attached File- Added Clipboard01.png, #30302
    2014-01-17 mtmiller Operating SystemMac OS Any
    2014-01-17 mtmiller Dependencies- bugs #41263 is dependent
    2012-08-10 przemek Attached File- Added logo-256.png, #26343
        Attached File- Added logo-512.png, #26344

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code