Converting display to single color output
I’m writing an application that needs to output all items using only a single color, green. The display device can only show green and doesn’t do the color conversion itself. I’m using full color SVG images as well as custom drawing to accomplish the requirements for the display, but need a way to render the SVG images using only a single color. Being new to Qt, I’m not sure what I need in order to accomplish this goal, but I’m hoping you all can help.
You probably want to look at QBitmap [doc.qt.nokia.com].
Edit: There’s also a nice SVG rendering example here [doc.qt.nokia.com]. Also, a key phrase from the QBitmap docs is: “If a pixmap with a depth greater than 1 is assigned to a bitmap, the bitmap will be dithered automatically.”
Just a few thoughts…
I saw that, but didn’t see how I could tell it that the colors I wanted to use was green/black instead of black/white. Also, I have two prototype systems, one using QPixmap to render the images and the other using QGraphicsSvgItem. While QBitmap could be used as a substitute in the first case, I don’t know how I could use it for the second. What could I do in that case?
Is there a way i can adjust some sort of global palette?
Hmm… I’m not sure I fully understand what you’re wanting to do then. It’s probably because I’m still thinking in terms of my early days when mono displays weren’t that uncommon and regardless of whether they were green or white or amber, they were still moreless representing a black & white image (which just happened to be displayed as black and green or black and amber or whatever.)
Are you trying to pull just the greenish elements from the SVG and display them? Or trying to represent the full color image as dithered shades of green? How do you intend to handle, say, something that’s red or blue in your source image?
Aside from what I’ve mentioned, I really don’t have a lot of other insight without a better idea of what the source files look like and how they’re envisioned of appearing in the final display, etc.
I hope you have some better ideas now after this exchange, or that anyone else might have some good insight.