PNG with white background but 0 alpha

Is it possible to create a png with a white background but 0 as the alpha value? Other pixels can have an alpha value greater than 0.
16 Replies
JavaBot
JavaBot11mo ago
This post has been reserved for your question.
Hey @Noah | Nowipi! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Noah | Nowipi
Noah | NowipiOP11mo ago
I already tried g.fillRect with setColor as 1f 1f 1f 0f but that creates an image with 0 0 0 0 rgba as background maybe it's a compression thing?
Kyo-chan
Kyo-chan11mo ago
Draw routines are going to account for the transluency, and especially in your case transparency, of what you're trying to draw, as the result is supposed to be one layer as the resulting image. If you want to try such a thing you're going to have to modify pixel values rather than drawing on the image.
Noah | Nowipi
Noah | NowipiOP11mo ago
are you talking about buffered image's setRGB method? because I also tried that but before I do my regular drawing procedures would it make a difference if I did it after my regular drawing procedures?
Kyo-chan
Kyo-chan11mo ago
Hmm I'm not sure Normally, drawing something that's fully transparent is just something you should consider as useless to do
Noah | Nowipi
Noah | NowipiOP11mo ago
I need it though
Kyo-chan
Kyo-chan11mo ago
In principle drawing something transparent is equivalent to not doing anything. So it seems you're saying that you require a step that does nothing;
Noah | Nowipi
Noah | NowipiOP11mo ago
not if you interpret rgba data differently
Kyo-chan
Kyo-chan11mo ago
Oh right. Fill and stroke offer different composition options, right?
Noah | Nowipi
Noah | NowipiOP11mo ago
yeah
Kyo-chan
Kyo-chan11mo ago
And you've opted out of mentioning your composition of choice, because?
Noah | Nowipi
Noah | NowipiOP11mo ago
I mentioned fillRect the only 'real' drawing I need to perform is drawString I am creating a bitmap for textrendering btw the background needs to have a white rgb value so I don't need to switch textures for rendering anyrhing other than text
JavaBot
JavaBot11mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Noah | Nowipi
Noah | NowipiOP11mo ago
:hidethepain:
Kyo-chan
Kyo-chan11mo ago
You mentioned fillRect but not the composition you used. I literally mentioned it's the composition that may matter. And you still have not explained what's the composition you use nor why.
JavaBot
JavaBot11mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?