cloud goes social

Icon

computer, travel, movies, music, cuisine and more

Thank you

As you have noticed I’ve added a donation button on the top right part of the site.

The other day Mr. William Edmondson, from Comcast has donated me some money. Being the first time such a thing happens I would like to thank him in particular. I hope you have found interest in what I write.

I will add a section of all the donors to my site, so your names won’t be forgotten. And from my side I will keep on writing and coding and keeping you updated.

Following up this weekend a new version of the ImageMagick for iPhone test project (which I know you love to read about) from the comment of another reader of this site. And also following a new post with some nice specifications of the iPhone that you may find useful (and it took me a while to dig out).

So, again, thank you all, and stay tuned!

ciop ciop

Category: rand

Tagged: , ,

20 Responses

  1. alstar says:

    Hey guys,

    I’ve been trying to fix the issue billie was getting for the last ~7 hours. I think the error occured because i ran an install of ImageMagik linking to default Apple libraries when it should link to iPhone SDK libraries.

    revert the install of ImageMagic by removing all traces from ‘/usr/local/lib’ and ‘/usr/local/include’

    do a ‘find /usr/local -name ‘*Magic*’ in terminal

    Working now.

    • alstar says:

      the problem im referring to is :

      [Session started at 2009-08-30 17:40:42 -0400.]
      dyld: Symbol not found: _CFXMLNodeGetInfoPtr
      Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
      Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation

      you dont need to re-install mac OSX

  2. bille says:

    I’ve finally been able to resolve all problems by reinstalling Mac OSX (and tools) from scratch. I can now run ImageMagick on the iPhone Simulator.

  3. bille says:

    I configured this setup (png with no compression or benchmarks)…

    #define NUM_OF_ROUNDS 10
    #define DO_BENCHMARKS
    // comment this line if you want to do benchmarks
    #undef DO_BENCHMARKS

    // if you are benchmarking this one isn’t taken into account!
    #define USE_JPEG_COMPRESSION
    // comment this line if you want to use JPEG compression
    #undef USE_JPEG_COMPRESSION

    // if you want to use the new method for images with unusual number of bits per component
    // thank you to Jon Keane: kean.jon@gmail.com
    #define UNUSUAL_NUMBER_OF_BITS
    // comment this line if you want to use the new method
    #undef UNUSUAL_NUMBER_OF_BITS

    // if you want to test PNG files rather than TIFF ones comment this line
    #define USE_PNG

    //////

    I end up taking an exception …

    const char * filename= “/Users/cloud/Desktop/testimage.tif”;
    status = MagickWriteImage(magick_wand, filename);
    if (status == MagickFalse) {
    ThrowWandException(magick_wand);
    }

    • Cloud says:

      That’s my fault, I left there that line to save the image to the desktop because I was doing some tests, comment them out:

      const char * filename= “/Users/cloud/Desktop/testimage.tif”;
      status = MagickWriteImage(magick_wand, filename);
      
  4. bille says:

    Using your project, I get the same error when running on the iPhone Simulator. Do you require that I have Macport installed for your project to work on the Simulator?

    When running on the target, I do not get the error! Yea! I get an image of the iPhone with the text ‘TIFF -ZIP’. If I touch the iPhone display, the debugger stops and I get this error…

    2009-09-02 18:36:48.416 IM_Test[4014:207] we’re not using JPEG compression
    /Users/wae/Downloads/IM_Test/Classes/IM_TestViewController.m -[IM_TestViewController posterizeImageWithoutCompression] 228 unable to open image `/Users/cloud/Desktop/testimage.tif’: No such file or directory @ blob.c/OpenBlob/2489

    Debugger stopped.
    Program exited with status value:255.

    Is this expected behavior?

    • Cloud says:

      No… It’s an error, you should see the image change… Try to use JPEG compression and PNG instead of TIFF (they’re both #defines at the beginning of the project) and tell me if you have different results!

      • bille says:

        it works!

        At this point, I’m in great shape. It is now working on the sim as well. To get it working, I had to reinstall Mac OS X from the install DVD. My install must have been corrupted from various other installs (Macport, MacFuse, you name it, …).

        For starters, I will be working with PNG only. What #defines do I enable/disable?

        Thanks for leading along the way. I needed the direction to get to this point. I still have a long way to go, but I learned a LOT sofar.

      • Cloud says:

        I’m glad it is working now!
        So, the defines on top of the IM_TestViewController.m are used to use PNG or TIFF or to use the image inside ImageMagick as compressed or not!

        They have (usually) easy names, like: #USE_PNG, #USE_JPEG_COMPRESSION, …

        You can comment them out or not and see the different results!

  5. bille says:

    I tried the latest version of IM_Test.zip from this weekend, but I am still getting this runtime error …

    [Session started at 2009-08-30 17:40:42 -0400.]
    dyld: Symbol not found: _CFXMLNodeGetInfoPtr
    Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
    Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation

    I am using XCode version 3.1.3 and iPhone Simulator version 3.0.

    Could you try building and running using these versions and try to help me get through this problem?

    • Cloud says:

      Dear William, I really cannot understand that error. From what I think it might be some kind of error while parsing the xml files, but I don’t see why. I tried running the code both on the simulator and on the device (3.0) and on the simulator with the latest beta (3.1) and it works fine for me.

      You can try and update XCode to the latest version (3.1.4) and let me know. Also I was working on Leopard, but just tested it on Snow Leopard and it works fine.

      I’ll look into your problem!
      [Update]
      From what I see it’s something related to the fact that in your case the project is being linked against the Security.framework and in particular libcurl. Why this happens I don’t really know.

      Try going into Targets->IM_Test and do Command-I – in the general tab make sure that you are not linking against such things.
      If it still doesn’t work, the only suggestion would be that of going through all the settings I told you in the first post and create a project from ground up!

      Let me know if you still have this problem!

      • bille says:

        The library/framework list is…

        - Foundation
        - UIKit
        - CoreGraphics
        - libjpeg
        - libMagickCore
        - libMagickWand
        - libpng
        - libtiff

        I will try to upgrade to XCode 3.1.4. If that doesn’t work, I’ll create a new XCode project from scratch (following your initial steps).

      • bille says:

        UPDATE: I am only able to find OS 3.1 Beta 3, so I am upgrading to that version.

    • Cloud says:

      The list is correct. I’ve updated also to the newest XCode (under Snow Leopard) 3.2 and it still works.
      From what I’ve understood about the problem it’s XCode thinking that the project needs such weird library (framework) while it doesn’t.

      Try also to do a ‘clean all’ (Build->Clean all targets), it might help (though I doubt).

      • bille says:

        I’ve created an XCode project from scratch per your instructions. I still get the error. It only occurs when I include the libMagickCore or libMagickWand libraries; I get no runtime error when building with the png, jpeg and tiff libraries.

        Is it possible that my Mac OS X SDK install is corrupt (extra libs installed or replaced)?

        Would you think that wiping the SDK area and reinstalling would be worthwhile?

    • Cloud says:

      It’s really weird, because I know others don’t have problems in running my project. You could try wiping the area and re-installing the SDK. I’ve tested it also in the newest XCode under Snow Leopard and it compiles and work fine.

      Let me know if you manage!

      • bille says:

        I wiped the Developer area and reinstalled the tools. Still, I get the same error.

        I suspect it has something to do with the way ImageMagick is being built (since the problem happens only when libMagickCore.a or ‘libMagickWand.a’ is added to the project). Now that I’ve replaced all of the Developer area, I will delete and reload the lib build areas and compile_im.sh from the web.

      • bille says:

        Well, after much cleanup and reinstallation, I am getting a different error…

        [Session started at 2009-09-02 13:13:45 -0400.]
        dyld: Library not loaded: /opt/local/lib/libfontconfig.1.dylib
        Referenced from: /usr/local/lib/libMagickCore.2.dylib
        Reason: image not found

        I suspect that this has something to do with what (Mac)ports have been installed.

        Does this ring any bells? Can you offer any suggestions?

      • Cloud says:

        That definetely is an error of the libraries. You see you’re trying to use dynamically loaded libraries, which are not allowed on the iPhone. Instead you should use something like libMagickCore.a (not libMagickCore.dylib).

        Hope it somehow solves your problems! (Give my project another try, it should really work!)

Leave a Reply

Donate

If you appreciate my work, my applications, this blog in general or you simply feel like rewarding me for something please consider donate.
Any amount will motivate me in keeping up with the blog and the applications.


Thank you!

Donors

F. Olsen, W. Chang, W. Edmondson, C. Sharff, M. Brown, G. Helton, J. de Ruiter, K. Langner, K. Smith, T. OHalloran, B. Zabarauskas

Listening to ...