Opened 11 years ago
Closed 11 years ago
#967 closed defect/bug (duplicate)
Icon image display garbled on Win XP
Reported by: | crystalgfan . | Owned by: | KaZeR |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | core | Version: | git master |
Severity: | Keywords: | Image missing - Android and Win XP | |
Cc: | sebastian.leske@…, michael@… |
Description
Hi,
I noticed this when looking for POIs.
Please have a look at attached pictures.
Which image isn't there?
SVN 4845
Attachments (3)
Change History (12)
Changed 11 years ago by crystalgfan .
Changed 11 years ago by crystalgfan .
comment:1 Changed 11 years ago by sleske
About your second screenshot (SC20111118-160016_.png): It's not a bug, it's a feature :-).
The "question mark" icon is not a missing icon, it's shown intentionally. It stand for "Other POIs" (as you can see if you click on it). I suppose it was used because it's difficult to find an appropriate icon for "Other".
comment:2 follow-up: ↓ 3 Changed 11 years ago by sleske
About the first screenshot (Navit_POI_MissedIcon.jpg): That does look like a problem/bug.
I seems the icon Navit is trying to show is somehow corrupted.
Can you provide information on how to reproduce this? Also, make sure you can reproduce it with a clean build of Navit (ideally, check out a fresh copy & build). Maybe the icon file just got corrupted.
comment:3 in reply to: ↑ 2 Changed 11 years ago by crystalgfan .
Replying to http://sleske.myopenid.com/:
Can you provide information on how to reproduce this? Also, make sure you can reproduce it with a clean build of Navit (ideally, check out a fresh copy & build). Maybe the icon file just got corrupted.
Hi,
Sorry for delay.
I'm only a customer and used to use the svn-zips for Win Xp so I guess I got a clean build, in this case this one: navit-svn-4845.zip.
What's the icon's filename that should be there?
comment:4 Changed 11 years ago by sleske
Interesting... I downloaded navit-svn-4845.zip from http://download.navit-project.org/navit/win32_cmake/svn/navit-svn-4845.zip , and I can reproduce the problem - even though I am using wine on Linux. Kudos to the wine team :-).
I'm investigating this...
comment:5 Changed 11 years ago by sleske
The problem seems to be related to the image file for the "Other" icon, which is xpm/unknown.xpm. The file is not corrupted, but Navit apparently cannot display it properly. The problem appears to be that it is relatively small (13x14 pixels).
I tried replacing xpm/unknown.xpm by a magnified version:
- If I scale unknown.xpm to 48x48 px (like the other icons on the screen, which appear correctly) and convert it to PNG, then it is shown correctly.
- If I scale it to 48x48 px, but leave it as XPM, then it is also shown correctly, but in the wrong position (shifted to the right and down by about half its height/width). Apparently the origin is calculated differently for XPM files (?).
comment:6 Changed 11 years ago by sleske
To me, this looks like a bug in the image loading/scaling code. Unfortunately, as it seems to only occur on Windows, I can't really help, as I don't develop on Windows. Maybe someone else can have a look?
As a workaround, replace xpm/unknown.xpm by the unknown.png I attached to this report. This will fix the bug.
At any rate, Navit is moving from XPM to SVG as its icon format. Once all the XPM files have been converted/replaced, this problem will no longer be relevant (as an 48x48 px PNG is automatically generated for each SVG icon).
comment:7 Changed 11 years ago by sleske
- Summary changed from Image missing - Android and Win XP to Icon image display garbled on Win XP
comment:8 Changed 11 years ago by sleske
- Cc sebastian.leske@… added
comment:9 Changed 11 years ago by mvglasow (2)
- Cc michael@… added
- Resolution set to duplicate
- Status changed from new to closed
This is the same issue described in #498 – XPM icons render to garbage in Windows (both desktop and CE) port.
@Sebastian: your investigation about size is new information – so far we found out only that it seems to be in the XPM code for Windows. I've copied the relevant section over to #498. I'll close this one as duplicate, please use #498 for this issue.
Missing image