iPhone Rejection for Private API calls

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.
ncm123

Re: iPhone Rejection for Private API calls

Post 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]);
cloud
Posts: 26
Joined: 2009-06-26T07:09:31-07:00
Authentication code: 8675309
Location: Zürich, Switzerland | Como, Italy

Re: iPhone Rejection for Private API calls

Post 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
IM compilation script and test project: https://github.com/marforic/imagemagick_lib_iphone (always up-to-date)
IM latest iOS binaries: ftp://ftp.imagemagick.org/pub/ImageMagick/iOS/
ncm123

Re: iPhone Rejection for Private API calls

Post 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!
ncm123

Re: iPhone Rejection for Private API calls

Post by ncm123 »

My app has been approved by Apple. I want to thank you all for all the wonderful support.

Thanks!
joze

Re: iPhone Rejection for Private API calls

Post 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
Vortec4800

Re: iPhone Rejection for Private API calls

Post 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.
joze

Re: iPhone Rejection for Private API calls

Post 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
biteme

Re: iPhone Rejection for Private API calls

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: iPhone Rejection for Private API calls

Post by magick »

AllocateSemaphoreInfo() is in the MagickCore library. Did you include MagickCore in your linker command line?
biteme

Re: iPhone Rejection for Private API calls

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: iPhone Rejection for Private API calls

Post 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).
biteme

Re: iPhone Rejection for Private API calls

Post 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.
cloud
Posts: 26
Joined: 2009-06-26T07:09:31-07:00
Authentication code: 8675309
Location: Zürich, Switzerland | Como, Italy

Re: iPhone Rejection for Private API calls

Post by cloud »

I will see if I manage to get rid of it. But I'm a bit busy lately.

~C
IM compilation script and test project: https://github.com/marforic/imagemagick_lib_iphone (always up-to-date)
IM latest iOS binaries: ftp://ftp.imagemagick.org/pub/ImageMagick/iOS/
cloud
Posts: 26
Joined: 2009-06-26T07:09:31-07:00
Authentication code: 8675309
Location: Zürich, Switzerland | Como, Italy

Re: iPhone Rejection for Private API calls

Post 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
IM compilation script and test project: https://github.com/marforic/imagemagick_lib_iphone (always up-to-date)
IM latest iOS binaries: ftp://ftp.imagemagick.org/pub/ImageMagick/iOS/
Post Reply