Opened 11 years ago

Closed 4 years ago

Last modified 4 years ago

#9554 closed bug (fixed)

[Tracker] doesn't scale built-in bitmap icons

Reported by: diver Owned by: jscipione
Priority: normal Milestone: R1/beta2
Component: Applications/Tracker Version: R1/Development
Keywords: Cc: diger
Blocked By: Blocking: #9588
Platform: All

Description

This is hrev45301.

Built-in tracker bitmap icons disappear if icon size > 32x32

Attachments (7)

nfs_32x32.png (9.0 KB ) - added by diver 11 years ago.
nfs_48x48.png (12.8 KB ) - added by diver 11 years ago.
0001-Allow-Tracker-to-load-image-resources-with-any-size.patch (1.3 KB ) - added by jscipione 11 years ago.
Allow Tracker to grab icons at any size, not just icon_size constants.
0002-Surround-ConvertFromCMAP8-with-ifdef-__HAIKU__-gaurd.patch (823 bytes ) - added by jscipione 11 years ago.
Surround ConvertFromCMAP8 with #ifdef HAIKU gaurd again
nfs.png (17.7 KB ) - added by diger 11 years ago.
Share Icon (7.8 KB ) - added by richienyhus 10 years ago.
Share Icon2 (7.8 KB ) - added by richienyhus 10 years ago.

Download all attachments as: .zip

Change History (22)

by diver, 11 years ago

Attachment: nfs_32x32.png added

by diver, 11 years ago

Attachment: nfs_48x48.png added

comment:1 by axeld, 11 years ago

Amazing that there are still some of them left. BTW this is probably not about scaling; I assume that Tracker will simply not know how to retrieve the resource in that size.

comment:2 by jscipione, 11 years ago

Somehow this is probably my fault. It should scale up the 32x32 version for you but perhaps it is rejecting the size before it gets to the scaling function. I know in some places we've allowed you to specify an icon size other than B_MINI_ICON and B_LARGE_ICON and in other places we restrict to just those sizes still.

comment:3 by jscipione, 11 years ago

patch: 01

by jscipione, 11 years ago

Allow Tracker to grab icons at any size, not just icon_size constants.

by jscipione, 11 years ago

Surround ConvertFromCMAP8 with #ifdef HAIKU gaurd again

comment:4 by jscipione, 11 years ago

I can't test these patches because I can't seem to get an NFS share to mount on my machine but I think this may solve the problem.

comment:5 by richienyhus, 11 years ago

Blocking: 9588 added

comment:6 by diger, 11 years ago

hrev46100 gcc4 - still no icon :(  

Last edited 11 years ago by diger (previous) (diff)

by diger, 11 years ago

Attachment: nfs.png added

by richienyhus, 10 years ago

Attachment: Share Icon added

by richienyhus, 10 years ago

Attachment: Share Icon2 added

comment:7 by richienyhus, 10 years ago

Two HVIF icons were created in GCI for system shares. I'm not on Haiku right now, so can't tell if they are any good.

comment:8 by waddlesplash, 9 years ago

Owner: changed from jscipione to waddlesplash
Status: newassigned

I can work on those HVIFs at some point later.

comment:9 by waddlesplash, 9 years ago

patch: 10

comment:10 by waddlesplash, 9 years ago

Nope, attached patch does not work. Tested against a NFS server I managed to get working (boy, that was a pain to set up...)

comment:11 by waddlesplash, 5 years ago

Owner: changed from waddlesplash to jscipione

comment:12 by jscipione, 4 years ago

I got the fallback icon to load at >32px sizes but the testing was hard to do because there are very few bitmap icons left in Tracker. The only way I was able to test this change was to alter Tracker to use the old BeOS volume icon for my volume instead of the vector one. Before my patch we were returning an error if the size passed in was not 16 or 32 which is why the icon would show as blank for sizes larger than 32x32. However, we are able to scale 16px and 32px bitmaps to larger sizes and convert them to B_RGBA (instead of BeOS icon's CMAP8) color space using IconUtils. IconUtils does not do a straight conversion but instead uses a combination of scale2x, scale3x, scale4x, bilinear down-scaling and as a last resort bilinear up-scaling to achieve a nicer looking scaled icon. So while I got the bitmap icon scaling to work we should probably also have a fall back to our (bitmap) fall back to our (vector) fall back and choose some generic icon in the case that for some reason we were not able to provide a scaled version of the bitmap.

comment:13 by jscipione, 4 years ago

Implemented feature with fallback in https://review.haiku-os.org/c/haiku/+/1960

If for some reason the bitmap icon won't convert and scale we center the given icon bitmap in the bigger icon area.

comment:14 by waddlesplash, 4 years ago

Resolution: fixed
Status: assignedclosed

Merged in hrev53589.

comment:15 by nielx, 4 years ago

Milestone: R1R1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.