bugGNU Octave - Bugs: bug #46758, mxe-octave: octave-logo.ico is...

 
 

bug #46758: mxe-octave: octave-logo.ico is cropped not scaled due to rsvg-convert bug

Submitted by:  Oliver Heimlich <oheim>
Submitted on:  Fri 25 Dec 2015 10:58:44 PM UTC  
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Wont Fix Assigned to:  None
Originator Name:  Oliver Heimlich Open/Closed:  Closed
Release:  4.0.1-rc1 Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Sun 03 Jul 2016 12:07:56 AM UTC, comment #43: 

Marking as Won't Fix, this is an upstream bug.

Rik <rik5>
Project Administrator
Sat 02 Jul 2016 11:30:19 PM UTC, comment #42: 

For info, the official 4.0.3 has the correct icons

John Donoghue <lostbard>
Project Member
Sat 02 Jul 2016 10:45:32 PM UTC, comment #41: 

works for me :)

John Donoghue <lostbard>
Project Member
Sat 02 Jul 2016 10:41:02 PM UTC, comment #40: 

Quoting from my own comment #18:

"This solution might be something as simple as requiring the maintainer who builds the tarball and MXE cross-compiled version of Octave to have an up-to-date system."

Since this is going to be such a pain, and will eventually get fixed by the distros, why don't we require that the officially generated version done by jwe be created on an up-to-date system with a working rsvg-convert?

Rik <rik5>
Project Administrator
Sat 02 Jul 2016 10:17:37 PM UTC, comment #39: 

Thats build versions of libpng
expat
fontconfig
pixman    
libffi    
dbus
glib
cairo
libxml2   
libgsf
pango
libcroco
gtk2
fontconfig
freetype

just to get rsvg-convert

John Donoghue <lostbard>
Project Member
Sat 02 Jul 2016 09:26:06 PM UTC, comment #38: 

Now i remember.

We need to build a host version of rsvg-convert, therefor need to build host versions of its dependancies as well.

John Donoghue <lostbard>
Project Member
Sat 02 Jul 2016 07:16:28 PM UTC, comment #37: 

No

I started, and found that there were a several additional dependancies since it uses gtk and cairo and others, and it didnt want to compile.

I believe mxe can compile those libs ok so was planning on looking at what work they had done on it, and then ran out of time at the time.

I'll take another look time permitting.

John Donoghue <lostbard>
Project Member
Sat 02 Jul 2016 05:14:36 PM UTC, comment #36: 

@JohnD: Ping!  Were you able to add rsvg-convert to MXE?

Rik <rik5>
Project Administrator
Wed 20 Apr 2016 02:59:50 PM UTC, comment #35: 

Wiill see how easy that is - looks like rsvg-convert needs a bunch of gtk and cairo dependancies

John Donoghue <lostbard>
Project Member
Tue 19 Apr 2016 04:36:47 PM UTC, comment #34: 

Suits me.  Let's add rsvg-convert, and any patch we need to reverse upstream's problems, to MXE.

Rik <rik5>
Project Administrator
Tue 19 Apr 2016 04:26:42 PM UTC, comment #33: 

Add  rsvg-convert as a build-rsvg-convert target in mxe-octave?

John Donoghue <lostbard>
Project Member
Wed 09 Mar 2016 07:19:48 PM UTC, comment #32: 

That is my vote.  rsvg-convert is a minimal little binary.

Rik <rik5>
Project Administrator
Wed 09 Mar 2016 07:02:53 PM UTC, comment #31: 

Do we agree that we should keep using the current set of tools and focus on fixing the bugs there instead of switching to using inkscape to do the image conversion?

I'd rather not switch to inkscape.  I'm not sure since I haven't tried it, but I suspect that it would be a lot harder to build that for Windows.

John W. Eaton <jwe>
Project Administrator
Thu 03 Mar 2016 01:59:51 AM UTC, comment #30: 

I couldnt find a bug report for it redhat so have created one: https://bugzilla.redhat.com/show_bug.cgi?id=1314138

John Donoghue <lostbard>
Project Member
Thu 03 Mar 2016 01:40:08 AM UTC, comment #29: 

I see a bug report created for the regression https://bugzilla.gnome.org/show_bug.cgi?id=762115

John Donoghue <lostbard>
Project Member
Thu 03 Mar 2016 01:14:55 AM UTC, comment #28: 

That patch corresponds to this upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=520654

So it is still an open bug in librsvg that was intended to add a new feature but introduced this regression, and Debian (and Ubuntu) are correctly reversing this "fix". John, you might want to check with bugzilla.redhat.com to see if it's been reported or needs to be reported against the Fedora package also.

Mike Miller <mtmiller>
Project Administrator
Thu 03 Mar 2016 01:08:07 AM UTC, comment #27: 

What's to be done?  Should we just make sure that the generated .ico in the tarball on ftp.gnu.org is correct for eevery release?

Rik <rik5>
Project Administrator
Thu 03 Mar 2016 12:57:32 AM UTC, comment #26: 

Must be broken in fedora.
I rebuilt rsvg-convert from source and it doesnt work.

If I apply debian/patches/01_Revert-bgo-520654-Support-export-id-in-rsvg-convert-.patch  from the debian sources [1] it works!

[1] http://http.debian.net/debian/pool/main/libr/librsvg/librsvg_2.40.13-3.debian.tar.xz

John Donoghue <lostbard>
Project Member
Thu 03 Mar 2016 12:41:47 AM UTC, comment #25: 

2.40.2 on mint linux does work

John Donoghue <lostbard>
Project Member
Thu 03 Mar 2016 12:11:29 AM UTC, comment #24: 

i tried some options a couple of weeks ago - using widtdth and height didnt work, neither did the aspect ratio.

Same thing was happening in my mint linux distro - off hand I dont know what version of rsvg-convert it was using, so will have to check it.

John Donoghue <lostbard>
Project Member
Wed 02 Mar 2016 10:21:18 PM UTC, comment #23: 

@John: Tried your example from comment #19 and it works for me.  Also tried with '-w 48' and I get an appropriately smaller icon.

Maybe it is broken on Fedora.  Do you have any other svgs you could experiment with so we can rule out the particular svg in this file?

Also, could you play with some of the options for rsvg-convert?  Maybe try setting both width AND height.  Or enabling the data-aspect-ratio preservation.

rsvg-convert --help
Usage:
  rsvg-convert [OPTION...] [FILE...] - SVG Converter

Help Options:
  -?, --help                                                  Show help options

Application Options:
  -d, --dpi-x=<float>                                         pixels per inch [optional; defaults to 90dpi]
  -p, --dpi-y=<float>                                         pixels per inch [optional; defaults to 90dpi]
  -x, --x-zoom=<float>                                        x zoom factor [optional; defaults to 1.0]
  -y, --y-zoom=<float>                                        y zoom factor [optional; defaults to 1.0]
  -z, --zoom=<float>                                          zoom factor [optional; defaults to 1.0]
  -w, --width=<int>                                           width [optional; defaults to the SVG's width]
  -h, --height=<int>                                          height [optional; defaults to the SVG's height]
  -f, --format=[png, pdf, ps, eps, svg, xml, recording]       save format [optional; defaults to 'png']
  -o, --output                                                output filename [optional; defaults to stdout]
  -a, --keep-aspect-ratio                                     whether to preserve the aspect ratio [optional; defaults to FALSE]
  -b, --background-color=[black, white, #abccee, #aaa...]     set the background color [optional; defaults to None]
  -u, --unlimited                                             Allow huge SVG files
  --keep-image-data                                           Keep image data
  --no-keep-image-data                                        Don't keep image data
  -v, --version                                               show version information

Rik <rik5>
Project Administrator
Wed 02 Mar 2016 10:00:44 PM UTC, comment #22: 

broken in fedora maybe?

John Donoghue <lostbard>
Project Member
Wed 02 Mar 2016 09:59:27 PM UTC, comment #21: 

Just updated to librsvg2-bin 2.40.13-3 from Debian unstable and I get the correct scaled png output.

Mike Miller <mtmiller>
Project Administrator
Wed 02 Mar 2016 09:56:01 PM UTC, comment #20: 

Just updated to librsvg2-tools-2.40.13-1 and retried - image is still cropped.

John Donoghue <lostbard>
Project Member
Wed 02 Mar 2016 09:46:36 PM UTC, comment #19: 

My fedora 22 box has librsvg2-tools-2.40.12-1

running:

rsvg-convert -w 64 etc/icons/octave-log.svg > test.png

gimp test.png

The image is just the top 64 pixels of the original image.

John Donoghue <lostbard>
Project Member
Wed 02 Mar 2016 06:25:12 PM UTC, comment #18: 

@Oliver: Great.  I had already used GIMP in doing some preliminary tests.  The current build system already works for me, but I am runing Kubuntu 15.10 which is pretty modern.  My version of librsvg2-bin is 2.40.10-1.

This solution might be something as simple as requiring the maintainer who builds the tarball and MXE cross-compiled version of Octave to have an up-to-date system.

Rik <rik5>
Project Administrator
Wed 02 Mar 2016 06:10:51 PM UTC, comment #17: 

You can open the .ico file in GIMP. The different resolutions will show up as different layers.

Also it might be an option to check in the .ico file.

Oliver Heimlich <oheim>
Wed 02 Mar 2016 06:04:04 PM UTC, comment #16: 

I agree that having inkscape around seems like a lot too ask.

Is there a way to check whether the .ico is correctly generated without running the full MXE build?  I'd like to try some experiments, but if it is an hour and half te build one test I won't get very far.

Rik <rik5>
Project Administrator
Thu 18 Feb 2016 09:38:15 PM UTC, comment #15: 

I think requiring inkscape to be installed to build Octave is a bigger burden, e.g. on non-desktop build boxes. I chose rsvg-convert originally because it's a small utility with minimal dependencies, and it was already supported in the mxe project.

Mike Miller <mtmiller>
Project Administrator
Thu 18 Feb 2016 09:06:04 PM UTC, comment #14: 

How about using inkscape instead of rsvg-convert to scale/create the png files?

Patch attached that uses inkscape and works for me

(file #36390)

John Donoghue <lostbard>
Project Member
Wed 17 Feb 2016 10:05:25 PM UTC, comment #13: 

I tried converting with inkscape on my system - after regenerating the png files, it is still the same - it is grapping a section of the requested size rather than resizing

John Donoghue <lostbard>
Project Member
Tue 16 Feb 2016 06:54:27 PM UTC, comment #12: 

This might be out of context but did you try to save the SVG as "Normal SVG" in Inkscape? I see that the svg files are saved as "Inkscape SVG". Maybe the converter has some issues with that?

Lutz Mager <rocketsound>
Sun 14 Feb 2016 03:35:34 PM UTC, comment #11: 

I played around a little with graphics magic - it will resize it (the svg file) but somehow only renders the orance squares not the curve from in the image.

John Donoghue <lostbard>
Project Member
Sat 06 Feb 2016 04:32:41 AM UTC, comment #10: 

svg-convert doesnt want to scale the image, instead just creating an image of the required size from the top left of the original

John Donoghue <lostbard>
Project Member
Sat 06 Feb 2016 04:07:49 AM UTC, comment #9: 

Mines broken now as well :)

Looking at the .png files, the only one that shows a correct image is the size 256

John Donoghue <lostbard>
Project Member
Sat 06 Feb 2016 03:58:22 AM UTC, comment #8: 

what happens if you delete etc/icons/octave-logo.ico
and then run make etc/icons/octave-logo.ico

John Donoghue <lostbard>
Project Member
Fri 05 Feb 2016 08:23:42 PM UTC, comment #7: 

Lately it is also broken in 4.1.0+ when cross-built in mxe-octave.

Philip Nienhuis <philipnienhuis>
Project Member
Tue 19 Jan 2016 09:48:14 PM UTC, comment #6: 

I can confirm that I can produce a valid ico-file with the current mxe-octave.

Unfortunately the ico-file in the official rc3 installer is still broken.

Oliver Heimlich <oheim>
Wed 30 Dec 2015 12:01:26 AM UTC, comment #5: 

To be more clear, something wrong with the generated icon file in the tarball on the octave website.

John Donoghue <lostbard>
Project Member
Tue 29 Dec 2015 12:48:07 AM UTC, comment #4: 

Building from checked out version of stable rc-4.0.1 instead of using the tarball from the website, and the icon file is as below:

icotool -l etc/icons/octave-logo.ico
--icon --index=1 --width=48 --height=48 --bit-depth=32 --palette-size=0
--icon --index=2 --width=32 --height=32 --bit-depth=32 --palette-size=0
--icon --index=3 --width=16 --height=16 --bit-depth=32 --palette-size=0
--icon --index=4 --width=256 --height=256 --bit-depth=32 --palette-size=0

So it appears something was wrong with the tarball build of the icon.

John Donoghue <lostbard>
Project Member
Sun 27 Dec 2015 09:21:44 PM UTC, comment #3: 

Rebuild on my machine and is same as the offical rc1 version.

Looking at the files between the 4.0.1-rc1 and a 4.1.0+ version I do see:

4.0.1-rc1:

icotool  -l w32/octave/home/jade/mxe-octave_hg/w32/usr/i686-w64-mingw32/share/octave/4.0.1-rc1/imagelib/octave-logo.ico
--icon --index=1 --width=48 --height=48 --bit-depth=32 --palette-size=0
--icon --index=2 --width=32 --height=32 --bit-depth=1 --palette-size=2
--icon --index=3 --width=16 --height=16 --bit-depth=1 --palette-size=2
--icon --index=4 --width=256 --height=256 --bit-depth=32 --palette-size=0

4.1.0+

icotool -l build/etc/icons/octave-logo.ico
--icon --index=1 --width=48 --height=48 --bit-depth=32 --palette-size=0
--icon --index=2 --width=32 --height=32 --bit-depth=32 --palette-size=0
--icon --index=3 --width=16 --height=16 --bit-depth=32 --palette-size=0
--icon --index=4 --width=256 --height=256 --bit-depth=32 --palette-size=0

John Donoghue <lostbard>
Project Member
Sun 27 Dec 2015 01:01:15 AM UTC, comment #2: 

It is the same on mine for the 4.0.1-rc1 installed from the octave website.

I have a build of 4.1.0+ also installed (that I built myself) that has the correct icons, so I am not sure whether it is an issue with what was generated in JWEs installer, or somethiong changed between the 4.0.0 -> 4.0.1 -> 4.1.0+

I will try my own build of 4.0.1-rc1 and see if happens with my own 4.0.1 build.

John Donoghue <lostbard>
Project Member
Fri 25 Dec 2015 11:01:45 PM UTC, comment #1: 

P.S. This affects the start menu shortcuts, not the window icon.

Oliver Heimlich <oheim>
Fri 25 Dec 2015 10:58:44 PM UTC, original submission:  

The octave-logo.ico in the Windows installer is a 48x48 ico file, which mainly shows a white background with a little blue triangle in the lower right corner (it is the upper left corner of octave-logo.svg). In 4.0.0 the logo was okay.

Oliver Heimlich <oheim>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #36390:  use_inkscape.patch added by lostbard (3KiB - application/octet-stream)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rocketsound (Posted a comment)
  • -email is unavailable- added by oheim
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by oheim (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-03 rik5 StatusConfirmed => Wont Fix
        Open/ClosedOpen => Closed
    2016-04-29 mtmiller Summaryoctave-logo.ico is cropped not scaled => mxe-octave: octave-logo.ico is cropped not scaled due to rsvg-convert bug
    2016-02-27 lachlan Dependencies- => bugs #47278 is dependent
    2016-02-18 lostbard Attached File- => Added use_inkscape.patch, #36390
    2016-01-19 oheim Carbon-Copy- => Added jwe@octave.org
    2015-12-27 lostbard StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.5