0
votes

I have an iOS app that makes images that are used in someone else's app on the AppStore that allows users to upload images.

The problem is they do an overlay on the image that is black with 10% visibility (alpha = 0.1) (a light light light grey)... so if I want the image to appear as white I create a blank image that is 255,255,255 for RGB (aka 1.0f, 1.0f, 1.0f) But once it's uploaded their light grey overlay goes ontop of it and that iPhone display merges the pixels while rendering which does 90% white and 10% black. So I actually get a light grey color instead of a white... so I'm thinking if I can create a super white (the actual data of the image file says that the color for any given pixel is 300, 300, 300 instead of the current max (255,255,255) .. then when iOS tries to render it, it will do the overlay algorithm and overlay the black by 10% (which subtracts from the RGB values... but the final value (although less than 300,300,300 will still be above 255,255,255 and appear as white.)

I have a feeling this will involve editing the actual data of a png file? Would this even work? Is there a better way to do this? Thanks!

1
I don't quite understand what you're trying to achieve with the 'overlay' - are you trying to cancel it out so it is no longer there? Also, does the overlay cover the whole image or is it a border?Sarreph
@Rorz It covers the whole image and I am trying to cancel it out... I can cancel it out with colors like blue just by making the blue 10% whiter so that when the 10% black overlay gets added on they cancel out... but I can't cancel it out with a white color, I just get a light grey instead.Albert Renshaw

1 Answers

0
votes

You cannot. The 255-per-channel maximum is not an arbitrary number. In standard 24-bit color (8 bits per channel, red, green, and blue), the maximum you can store for each channel is an eight bit number, i.e. values between 0 and 255. So it doesn't make sense to try to use a value greater than 255.

If that app is dimming the images, you cannot do anything for your whites. There is no "superwhite".

The best you can do is ask the author of that other app to offer the ability to somehow disable/diminish the dimming overlay.