Page 3 of 3

Re: iPhone Rejection for Private API calls

Posted: 2010-05-02T23:01:18-07:00
by ncm123
cloud wrote:Can we know which error is? So I can look into it?
Thank you :)
I got this error.
337 CorruptImage `' @ error/png.c/ReadPNGImage/3044

On this piece of code-

Code: Select all

dataObject = UIImagePNGRepresentation([UIImage imageNamed:@"ping.png"]);
status = MagickReadImageBlob(magick_wand_mask, [dataObject bytes], [dataObject length]);

Re: iPhone Rejection for Private API calls

Posted: 2010-05-03T04:02:30-07:00
by cloud
ncm123 wrote:I got this error.
337 CorruptImage `' @ error/png.c/ReadPNGImage/3044

On this piece of code-

Code: Select all

dataObject = UIImagePNGRepresentation([UIImage imageNamed:@"ping.png"]);
status = MagickReadImageBlob(magick_wand_mask, [dataObject bytes], [dataObject length]);
Ok, can you try and use UIImageJPEGRepresentation even when using a .png image? Let me know if that works. Using such functions isn't the best way to get back the data from a UIImage, but rather one should dwell into Core Graphics to get it.

Let me know if using the other method works for you.

~C

Re: iPhone Rejection for Private API calls

Posted: 2010-05-05T05:34:44-07:00
by ncm123
cloud wrote: Ok, can you try and use UIImageJPEGRepresentation even when using a .png image? Let me know if that works. Using such functions isn't the best way to get back the data from a UIImage, but rather one should dwell into Core Graphics to get it.

Let me know if using the other method works for you.
~C
Hi,
I tried this,it doesnt work. But theres no error, the app just hangs. BTW, how can I access UIImage with core graphics. Do you have an example?

Thanks!

Re: iPhone Rejection for Private API calls

Posted: 2010-05-06T21:39:25-07:00
by ncm123
My app has been approved by Apple. I want to thank you all for all the wonderful support.

Thanks!

Re: iPhone Rejection for Private API calls

Posted: 2010-10-22T13:30:26-07:00
by joze
Hi,

links are not working! Could you upload them again? Is there any other latest build?

I want to do a sharpening / contrast / saturation of the image, would it be slow on a 3gs? Is ImageMagick the best way to go?

thanks

regards,

jose

Re: iPhone Rejection for Private API calls

Posted: 2010-10-22T13:38:01-07:00
by Vortec4800
The links I posted a while back are quite old, and there must be newer versions that address some of the issues I was having. The project I was working on got scrapped, so we stopped looking for solutions and alternatives.

Depending on the size of the image, it was quite slow on an iPad which runs much faster than the 3GS. If you're dealing with small images it probably won't be too bad, but the performance was one of the main reasons the project was abandoned in the first place.

Re: iPhone Rejection for Private API calls

Posted: 2010-10-22T14:06:09-07:00
by joze
Hi,

I get this error:

2010-10-22 22:01:48.492 IM_Test[80066:207] we're using JPEG compression
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
pthread_mutexattr_destroy$UNIX2003 called from function AllocateSemaphoreInfo in image IM_Test.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
open$UNIX2003 called from function ConfigureFileToStringInfo in image IM_Test.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
mmap$UNIX2003 called from function MapBlob in image IM_Test.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
munmap$UNIX2003 called from function UnmapBlob in image IM_Test.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
close$UNIX2003 called from function ConfigureFileToStringInfo in image IM_Test.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
strtod$UNIX2003 called from function GetMagickToken in image IM_Test.


everythings compiles fine but I get this exceptions! Any ideas? I downloaded the sample code and I run into this

regards,

jose

Re: iPhone Rejection for Private API calls

Posted: 2010-11-29T08:56:01-07:00
by biteme
Hello,

I have a same error:

at this code:

unsigned char *bitmapData = (unsigned char *)malloc(sizeof(unsigned char)*pixelsWide*pixelsHigh*pixelsComp);
MagickWandGenesis();
MagickWand *wandImage = NewMagickWand();
size_t dataLength = sizeof(unsigned char)*pixelsWide*pixelsHigh*pixelsComp;
MagickReadImageBlob(wandImage, bitmapData, dataLength);

MagickWriteImage(wandImage,
[[PathChecker SandboxPathWithFilename:[NSString stringWithFormat:@"Image (%i,%i).png",1,1]] UTF8String]);

wandImage = DestroyMagickWand(wandImage);

error:
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
pthread_mutexattr_destroy$UNIX2003 called from function AllocateSemaphoreInfo in image OABlahBlah.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
open$UNIX2003 called from function ConfigureFileToStringInfo in image OABlahBlah.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
strtod$UNIX2003 called from function GetMagickToken in image OABlahBlah.

Re: iPhone Rejection for Private API calls

Posted: 2010-11-29T09:50:38-07:00
by magick
AllocateSemaphoreInfo() is in the MagickCore library. Did you include MagickCore in your linker command line?

Re: iPhone Rejection for Private API calls

Posted: 2010-11-29T13:28:28-07:00
by biteme
magick wrote:AllocateSemaphoreInfo() is in the MagickCore library. Did you include MagickCore in your linker command line?
I have in Project Settings at row Other Linker Flag value -IMagickCore -IMagickWand -lz -lbz2 -ljpeg -lpng

Re: iPhone Rejection for Private API calls

Posted: 2010-11-29T13:44:12-07:00
by magick
Ok, now add support for pthreads. Is there a Posix thread library available (e.g. -lpthread)? You can build ImageMagick without threads (e.g. add --without-threads to the configure script command).

Re: iPhone Rejection for Private API calls

Posted: 2010-11-29T23:29:01-07:00
by biteme
magick wrote:Ok, now add support for pthreads. Is there a Posix thread library available (e.g. -lpthread)? You can build ImageMagick without threads (e.g. add --without-threads to the configure script command).
Could you give me already builded version without pthreads (or if you already added support pthreads to IM for iphone), because somehow I cant build it properly.

Thanks in advance.

Re: iPhone Rejection for Private API calls

Posted: 2010-12-12T14:09:16-07:00
by cloud
I will see if I manage to get rid of it. But I'm a bit busy lately.

~C

Re: iPhone Rejection for Private API calls

Posted: 2010-12-12T14:42:54-07:00
by cloud
You can find the latest IM (6.6.6-4) compiled for iPhone on the ImageMagick FTP website (as linked in my signature) -- and works without issues for me on the latest iPhone SDK. Soon I will commit update to the script for compiling as well.

Regards,

~C