Icons: Make PNG/XPM transparent, hi-res
Extend the ImageMagick convert commands for generating icon bitmaps:
- Add
-background none, to render with background transparency. - Add
-density 300x300, to render larger sizes at full resolution.
Because the SVG's internal coordinate system is only sized for 64x64 pixels, ImageMagick will render at that size and then scale the bitmap up, when outputting larger image sizes. Increasing the DPI using -density allows it to upscale the SVG vectors at full resolution.
Comparison: 256x256 usbview.png from this branch vs. master, atop solid red
(Yes, the need to specify either/both of these explicitly ranks among the more stupid and inexplicable of ImageMagick's... "endearing quirks".)
I added an additional -density flag to reset the icon bitmaps' intrinsic DPI to 96 before output, so that the 256-pixel icons don't get stored as 300 DPI 0.85 inch × 0.85 inch images. (Metadata matters!)
@gregkh Ping? I'm sure usbview is relatively low-priority, and there's certainly no real urgency to this. Just wanted to call your attention to it, if you hadn't seen. Thanks!
On Fri, May 24, 2024 at 03:17:47AM -0700, Frank Dana wrote:
@gregkh Ping? I'm sure usbview is relatively low-priority, and there's certainly no real urgency to this. Just wanted to call your attention to it, if you hadn't seen. Thanks!
I see it, thanks, will be a few weeks before I get back to usbview changes!
greg k-h
Weird... I had a new notification for this PR, but I can't for the life of me figure out why. Nothing's changed, that I can see.
Sorry for the delay, thanks for doing this!