Skip to main content

CHROMA | Apple fixes/fails to fix/fixes again show-stopping bugs in image-processing framework

Where's Chroma, the Photo Editing Extension for iPhone that's been so widely used for this blog, but not so widely published yet on the App Store? On it's way, again, now that Apple has finally fixed long-standing, show-stopping bugs in its Core Image framework, namely, bugs related to the acquisition of two image metrics: maximum and minimum pixel values.

As you can see from recent output to my debugger console, I can indeed acquire these metrics, just as I could on an intermittent basis before, albeit now on a consistent basis:

Maximum and minimum pixel values in an image are all-important, and without them not much can be done to an image that's worth doing
This long-standing issue has been the bane of many a developer, as evidenced by the numerous complaints posted to various developer sites across the web, such as stackoverflow.com, where I am a frequent contributor of answers to developers' questions regarding iOS programming.

Speaking of that site, I provided several developers with answers to the questions regarding this issue. Although my answers were correct at the time, they undoubtedly encountered the same intermittent and temporary success without any explanation for the inconsistency that I have. That's ultra-frustrating and off-putting for nascent programmers like the kind one encounters on such sites, and unnecessarily winnows a crop of upstarts that could have someday proved promising.

Worse, though, is that without the ability to obtain these measurements, much of the processing relevant to cloak detection in digital media cannot be performed, processing, for example, like this:

Contrast stretching and certain kinds of advanced histogram calculations—all necessary for success in cloak detection—cannot be performed correctly without the ability to obtain certain pixel values in an image
Details aside, the bottom line is that development is now resuming in earnest, and the product still remains shippable and is a viable solution for cloak detection, just as advertised, even now.

Anyone wishing to become a tester of the software (in other words, get started with the software now), simply ask.

Update
I spoke too soon; Apple is retarded, and fixed nothing. Without changing a single line of code, I re-ran Chroma, and my debugger console generated this nonsense (again):

Apple's idiotic handling of a very basic bug precludes any future development for this platform on my end, and completely precludes productive and useful products for iOS for anyone who doesn't follow my lead
So, here we are again: in Retardville with Apple, where things sometimes work, and they sometimes don't. Regardless, they never get fixed or garner anyone's attention. We just say shit works when it doesn't! Duuuuuuuuuuuuh....!

You can come out of the doghouse now
Provided this fix never turns to failure ever again:

Once fixed, then failed-to-fix, and now fixed again—I can get the basic image metrics I need for basic advanced image processing (sounds weird; said it right, though)
What's the friggin' difference?
The difference between stretching contrast and not is night and day for surface analysis and all the other types of specialized image processing that goes into cloak detection; but, for regular photography, admittedly, very little. Here's the kind of little I mean:

The original first still frame from the video in which I confront a demon-allied doctor about spreading her legs for SatanThe same still frame, with the contrast stretched to include the full color gamut; the difference is subtle, except in the dark places, where noticeable detail is added

The OpenGL ES 3.0 code for stretching contrast in the Chroma Photo Editing Extension (one of four ways to alter the contrast of images using my app) is:

The OpenGL ES 3.0 kernel code for stretching contrast is amazingly powerful—and only one relevant line
As you can see, there's only one relevant line in the code: the equation you saw from above. It's amazingly powerful, yet simply to implement—if only Apple delivers on the promised functionality of the CIAreaMaximum and CIAreaMinimum Core Image filters.