Rotate Image, set array

Discussion in 'Mac Programming' started by SirOmega, Apr 29, 2008.

  1. SirOmega macrumors 6502a

    Joined:
    Apr 17, 2006
    Location:
    Las Vegas
    #1
    Two separate questions...

    Is there any way to rotate a UIImage? I know I can rotate a UIView, but no setTransform on an UIImage.

    Also, is there a way to set all the values of an image in one statement? eg. int myVals[4]; myVals = {4,6,8,10};
     
  2. kpua macrumors 6502

    Joined:
    Jul 25, 2006
    #2
    Rotate the UIImageView it's drawn in...

    Not sure what you mean by the "values" of the image. The pixel values? Not unless you already have an NSData for the data. If you want to manually set pixel values, it looks like you'll have to go all the way down to the CG level and create a CGBitmapContext.
     
  3. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    You should just be able to do:

    Code:
    int myVals[] = {1,2,4,8};
    
    You are, after all, able to use all of C.
     
  4. SirOmega thread starter macrumors 6502a

    Joined:
    Apr 17, 2006
    Location:
    Las Vegas
    #4
    Yea I might have to do that. Its just that the ints are declared in the .h and I had planned to put all the value assignment bits in the initialization.
     

Share This Page