ImageMagick Sepia not working on iPhone ARM?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Vortec4800

ImageMagick Sepia not working on iPhone ARM?

Post by Vortec4800 »

The Sepia filter seems to be broken when I run it on the device. On the simulator, it works properly - on the device I just get a turquoise image. The solarize filter doesn't work either (and does on the Sim). I checked to make sure the math was all correct, and the filters are definitely receiving the same values on device as on sim. Any ideas on what to look for on this?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick Sepia not working on iPhone ARM?

Post by magick »

We do not have an ARM environment so we can't debug this problem. The code looks fairly straight-forward so we cannot determine the problem strictly from visual inspection.
Vortec4800

Re: ImageMagick Sepia not working on iPhone ARM?

Post by Vortec4800 »

Hmm, is there anything else I might be able to do or try to help either you or I narrow down the issue?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick Sepia not working on iPhone ARM?

Post by magick »

The Sepia tone effect includes a call to NormalizeImage() and ContrastImage(). You could check the -normalize and -contrast options to see if it fails in these methods rather than SepiaToneImage(). Otherwise you need to inject debug statements in the code (magick/fx.c/SepiaToneImage/3901) and compare the results on the iPhone and Mac OS X. Any deviations may give us insight into the problem.

We use C99 C code which should compile properly on any compiler and run on virtually any processor including an ARM. However, there may be some caveats associated with developing on an ARM processor. If you have a reference, post a URL here.

The last option would be to give us instructions to build and install ImageMagick on the iPhone such that we can access the output of any debugging statements we include. We'll try debugging ourselves on our iPhone. We have little experience on the iPhone so we'll need detailed instructions to get debugging working on the iPhone.
Vortec4800

Re: ImageMagick Sepia not working on iPhone ARM?

Post by Vortec4800 »

Sounds good. I'll get to it and send you guys anything I find.
Vortec4800

Re: ImageMagick Sepia not working on iPhone ARM?

Post by Vortec4800 »

Here are two archives. One contains a test project with the Image Magick frameworks already in it. This project compiles and runs both on the simulator and on the device (it only compiles on the iPad for some reason, not the iPhone - it's an issue with the j0 math functions). On the simulator, the sepia function works properly - on the device I get the turquoise image. The libraries included are IM-6.6.1-4. In order to successfully compile for the simulator, you need to open the project settings and check the Enable OpenMP box.

The other archive is the build script and source I'm using to compile Image Magick for iPhone and for the Sim. You can take a look at this and see how I have everything set up to compile. Let me know if you're able to get this working, or if you need any more details.

http://homepage.mac.com/cory.imdieke/im-build.zip
http://homepage.mac.com/cory.imdieke/IMTest.zip
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick Sepia not working on iPhone ARM?

Post by magick »

Thanks. It may take a week or so. We're swamped with some other work.
Vortec4800

Re: ImageMagick Sepia not working on iPhone ARM?

Post by Vortec4800 »

I don't suppose you guys have been able to look over this yet? I've posted some additional info in this thread:

viewtopic.php?f=2&t=16043

on page two. Thanks!
Post Reply