views:

126

answers:

2

Is there a way to convert an image on the fly to "Red on Black" for accessibility? I have pictures that I want to stream to the iphone. Viewing them at night, Red on Black is better for viewing.

+7  A: 

Answer:

You're much better off making your own night friendly images, and swapping those out along with text color, etc.

I'm not sure how you have your current images implemented, but before they load you could check for BOOL isNightTime, and if it returns TRUE, then load the nightTime images instead. I would suggest taking your current image set, and duplicating it with the prefix nt_.


Bonus:

You can take this a step further. Grab the GPS location, then use the location to get weather information from Wunderground. Part of their report includes the times of Sunrise and Sunset. You could then use those values and check them against the current time (be careful that all the time zones are playing nice), and from the result of that, enable the NightTime image set.

If you do implement this, make sure that the user can still enable or disable it to his/her preference.

I had originally said NOAA, but I can't find where that information is on their website. I know it's there somewhere. Why are .gov sites so ugly? Anyways, I changed it to mention Wunderground instead, just scroll down to the Astronomy section. They have a pretty well done iPhone website as well, worth checking out.


Bonus 2:

I'm unsure what your maps/images look like, but instead of having to edit them all to red on black, you could instead edit them to white on black, and put a layer on top of that which would allow the user to pick any color/intensity. Instead of using a layer, you could likely also programmatically implement it, but I think a colorizing layer would be much faster/easier.

An alternate method of doing this is to instead make your map transparent/black, and put a layer underneath that which could change colors to the user's liking. You could implement this on a finer scale (place rects of color behind objects/text/whatever else) to allow for full color customization.

Both use transparency to some extent, but I believe that the alternate method requires less overall work.


Bonus 3:

If you're already going through the effort to grab the GPS coordinates, it wouldn't be too much additional work to have it also check with another server, which would point out other users using the application locally on the map. Make sure this is disabled by default, as lots of users are uncomfortable with broadcasting their location to the world.


Science:

It's also worth mentioning that green is a horrible color to use if you're looking for night friendliness. Red is the color you want to be using. Red light doesn't cause the eye to release the enzymes which cause you to lose your nightvision (what you get once your eyes adjust). This is the reason the inside of military vehicles usually have red interior lights, and also why every movie you've ever seen with tactical anything uses lots of red lighting.

Red light is also used to preserve night vision in low-light or night-time situations, as the rod cells in the human eye aren't sensitive to red.
-Wikipedia

I learned this when I went up to Kitt Peak National Observatory this Thanksgiving on a family trip to Arizona. They hand out little keychains with red lights on them, so you can see where you're going in the dark. It was probably one of the coolest things I've ever participated in. I learned so much. If you're in the Tuscon area, or have another observatory local to you, I strongly suggest checking them out.

The keychain they gave me broke and it fell off somewhere, it's nowhere to be found :( It was my only souvenir. If anybody from KPNO happens to see this and wants to mail me another one, my email address is in my profile.

Also here's a link that goes into far much more detail than needed, but I know you're all going to google it anyways.

Sneakyness
I didn't have a clue about why it was red before this post. Great explanation. +1
Jimmie Lin
A: 

I did find another solution:

http://sourceforge.net/projects/photoshopframew/

Source code is available and i can run the tiles through photoshop as part of a chain of events for night viewing.

BlindingDawn
There is no reason to do this intensive series of tasks on the phone when they can be performed once somewhere else to offload a very large amount of work that the phone would be doing.
Sneakyness