← Back to team overview

kicad-developers team mailing list archive

Re: How to make single-plane .cpp from .png?

 

On 2019-08-05 15:22, Jeff Young wrote:
Our PNG2cpp.cmake script makes a 3 or 4 plane (ie: colour) char array.

wxWidgets’ wxBitmap() constructor needs a single plane char array.
John Beard created a couple for the SPICE cursors, but I’m not sure
how he did it.


I'm pretty sure that John just moved the cursors that Orson built. The PNG2cpp puts raw PNG data into cpp arrays.

Are you looking to build a new cursor library?

If you want to generate binary (white or black) cursors, you can save the icon as an XBM file from gimp. Then 0=white and 1=black. You can use the same PNG2cpp script to convert the file from XBM to a cpp array.

-Seth


Follow ups

References