Hi Thomas,

I attached some good icons. Maybe these help for comparison.


Oliver

I am still not successful.
Tried the attached file, swept the custom icons despite of this one and 
investigated even the hexdump.
No go.

Taken from CDlgSetupGarminIcons.cpp:


         if(    pBmp->biBitCount != 8
             || pBmp->biCompression != 0
             || (pBmp->biClrUsed != 0&&  pBmp->biClrUsed != 0x100)
             || (pBmp->biClrImportant != 0&&  pBmp->biClrImportant != 0x100)
             || pBmp->biWidth != 16
             || pBmp->biHeight != 16)

If I understand this filter right, the .bmp must be 16x16 pixels, 8 bpp,
palette with>16 entries, 32 bit each (RGBg), and at least one color used, 
maximum less than 256 (i.e. 255 and less) (the test is not completely perfect, but 
who cares)

The picture has 216 colors in it's palette. 4 of them are used, which makes 
KolourPaint and ImageMagick bad choices (both reduce to 4 bpp .bmp 
automatically).
Magenta (255 0 255) is used as bg color.
It's position in the palette is 0x1e, whereas black is 0xd7.

tme@lina 12:01:01:~/.Winnt/gps/icons$ hexdump -C basin.bmp.8new | head -58
00000000  42 4d 96 04 00 00 00 00  00 00 96 03 00 00 28 00  |BM............(.|
00000010  00 00 10 00 00 00 10 00  00 00 01 00 08 00 00 00  |................|
00000020  00 00 00 01 00 00 13 0b  00 00 13 0b 00 00 d8 00  |................|
00000030  00 00 d8 00 00 00 ff ff  ff 00 cc ff ff 00 99 ff  |................|
00000040  ff 00 66 ff ff 00 33 ff  ff 00 00 ff ff 00 ff cc  |..f...3.........|
00000050  ff 00 cc cc ff 00 99 cc  ff 00 66 cc ff 00 33 cc  |..........f...3.|
00000060  ff 00 00 cc ff 00 ff 99  ff 00 cc 99 ff 00 99 99  |................|
00000070  ff 00 66 99 ff 00 33 99  ff 00 00 99 ff 00 ff 66  |..f...3........f|

<some more palette entries>
Magenta begins at 0xae

000000a0  ff 00 66 33 ff 00 33 33  ff 00 00 33 ff 00 ff 00  |..f3..33...3....|
000000b0  ff 00 cc 00 ff 00 99 00  ff 00 66 00 ff 00 33 00  |..........f...3.|

<some more palette entries>

The palette begins at 0x36, with white as it's first entry. (ff ff ff 00)

The end of the palette and beginning of the image data.
.bmp is stored bottom-up, raster data bottom-left point at 0x396:


00000370  00 00 66 33 00 00 33 33  00 00 00 33 00 00 ff 00  |..f3..33...3....|
00000380  00 00 cc 00 00 00 99 00  00 00 66 00 00 00 33 00  |..........f...3.|
00000390  00 00 00 00 00 00 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
tme@lina 12:12:52:~/.Winnt/gps/icons$ hexdump -C basin.bmp.8new | head -60 | 
tail -3
00000390  00 00 00 00 00 00 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
000003a0  1e 1e 1e 1e 1e 1e 1e 1e  1e 1e d7 ac ac ac ac ac  |................|
000003b0  d7 1e 1e 1e 1e 1e 1e 1e  1e ac 9c 9c 9c 9c 9c 9c  |................|


As you can see, there is one byte for each pixel, no compression.

0xd7 is decimal 215, which is the 216. and last palette entry.
216 x 4 = 864 + 0x36 (54) = 918 = 0x396
So I understood the format correctly.

I still get 'Bad icon format'.

Did this code change from 1.1.2 (the sources I downloaded) to 1.2.2 (the binary 
I installed)?

Here is what ImageMagick says about the Icon:

tme@lina 11:55:36:~/.Winnt/gps/icons$ convert -identify -verbose basin.bmp.8new 
/dev/null
basin.bmp.8new BMP 16x16 16x16+0+0 8-bit PseudoClass 216c 1.15KiB 0.000u 
0:00.000
Image: basin.bmp.8new
   Format: BMP (Microsoft Windows bitmap image)
   Class: PseudoClass
   Geometry: 16x16+0+0
   Resolution: 28.35x28.35
   Print size: 0.564374x0.564374
   Units: PixelsPerCentimeter
   Type: Palette
   Endianess: Undefined
   Colorspace: RGB
   Depth: 8/4-bit
   Channel depth:
     red: 4-bit
     green: 4-bit
     blue: 4-bit
   Channel statistics:
.....cut off

I don't understand what's wrong. The dialog box with this message is unique in 
the sources in the file I investigated.

HELP !
please



-------- Original-Nachricht --------
Datum: Sun, 21 Aug 2011 17:10:49 +0200
Von: Oliver Eichler<[email protected]>
An: [email protected]
Betreff: Re: [Qlandkartegt-users] Bad Icon Format

Am 16.08.2011 08:58, schrieb Thomas Meller:
Hello altogether,

I installed the binary PPA-package 1.2.2 on ubuntu 10.04
On upload of the custom icon set, I get the response "Bad icon format'.

I tried the icon set as .png and as .bmp with the same result.
All Icons are 15x15, created by KolourPaint 4.4.5
BMPs are 24 bit, non-rle, PNGs are 8 bit, non-interlaced.


Hi Thomas

it must be bmp with 8 bit palette and magenta a transparent color. All
other flavors of the bmp format are not supported.

Oliver

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users


Attachment: icons.tar.gz
Description: GNU Zip compressed data

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to