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

 
 

bug #37062: hi-res icon

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Thu 09 Aug 2012 06:36:02 PM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: In ProgressAssigned to: None
Originator Name: Ben AbbottOpen/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

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>
Project 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>
Project 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>
Project 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):

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>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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:
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>
Project 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

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>
Project Administrator
Fri 17 Jan 2014 05:08:54 PM UTC, comment #17:

it's all there -- pls see screenshot.

(file #30302)

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>
Project Administrator
Fri 17 Jan 2014 04:45:20 PM UTC, comment #15:

you can use this ico file: <https://savannah.gnu.org/bugs/download.php?file_id=30300>

I've tested it on Windows:
<https://savannah.gnu.org/bugs/download.php?file_id=30301>

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>
Project 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>
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>
Project Administrator
Mon 13 Aug 2012 03:09:08 PM UTC, comment #11:

Theoretically 'convert' from GraphicsMagick can do the conversion.

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>
Project 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>
Project 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>
Project 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>
Project 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.

(file #26343, file #26344)

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>
Project Administrator
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>
Project Administrator
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>
Project 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>
Project Administrator
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>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Jan 2014 05:42:31 AM UTCmtmillerAttached File-=>Added make-icons.diff, #30334
    Tue 21 Jan 2014 04:02:28 AM UTCmtmillerAttached File-=>Added icons-scripted.zip, #30327
    Sun 19 Jan 2014 08:01:58 PM UTCmtmillerCategoryNone=>Configuration and Build System
      StatusNone=>In Progress
    Fri 17 Jan 2014 06:38:06 PM UTCfgnievinskiAttached File-=>Added icons.zip, #30303
    Fri 17 Jan 2014 05:08:54 PM UTCfgnievinskiAttached File-=>Added Clipboard01.png, #30302
    Fri 17 Jan 2014 02:37:34 PM UTCmtmillerOperating SystemMac OS=>Any
    Fri 17 Jan 2014 02:35:23 PM UTCmtmillerDependencies-=>bugs #41263 is dependent
    Fri 10 Aug 2012 01:24:49 PM UTCprzemekAttached File-=>Added logo-256.png, #26343
      Attached File-=>Added logo-512.png, #26344

    Back to the top


    Powered by Savane 3.1-cleanup