Search Results

Search found 7 results on 1 pages for 'ikimageview'.

Page 1/1 | 1 

  • Another IKImageView Question: copying a region

    - by Brian Postow
    I'm trying to use the select and copy feature of the IKImageView. If all you want to do is have an app with an image, select a portion and copy it to the clipboard, it's easy. You set the copy menu pick to the first responder's copy:(id) method and magically everything works. However, if you want something more complicated, like you want to copy as part of some other operation, I can't seem to find the method to do this. IKImageView doesn't seem to have a copy method, it doesn't seem to have a method that will even tell you the selected rectangle! I have gone through Hillegass' book, so I understand how the clipboard works, just not how to get the portion of the image out of the view... Now, I'm starting to think that I made a mistake in basing my project on IKImageView, but it's what Preview is built on (or so I've read), so I figured it had to be stable... and anyway, now it's too late, I'm too deep in this to start over... So, other than not using IKImageView, any suggestions on how to copy the select region to the clipboard manually? EDIT actually, I have found the copy(id) method, but when I call it, I get <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 16 bits/pixel; 1-component color space; kCGImageAlphaPremultipliedLast; 2624 bytes/row. Which obviously doesn't happen when I do a normal copy through the first-responder... I understand the error message, but I'm not sure where it's getting those parameters from... Is there any way to trace through this and see how this is happening? A debugger won't help for obvious reasons, as well as the fact that I'm doing this in Mozilla, so a debugger isn't an option anyway... EDIT 2 It occurs to me that the copy:(id) method I found may be copying the VIEW rather than copying a chunk of the image to the clipboard, which is what I need. The reason I thought it was the clipboard copy is that in another project, where I'm copying from an IKImageView to the clipboard straight from the edit menu, it just sends a copy:(id) to the firstResponder, but I'm not actually sure what the firstresponder does with it...

    Read the article

  • Another IKImageView Question

    - by Brian Postow
    I'm trying to use the select and copy feature of the IKImageView. If all you want to do is have an app with an image, select a portion and copy it to the clipboard, it's easy. You set the copy menu pick to the first responder's copy:(id) method and magically everything works. However, if you want something more complicated, like you want to copy as part of some other operation, I can't seem to find the method to do this. IKImageView doesn't seem to have a copy method, it doesn't seem to have a method that will even tell you the selected rectangle! I have gone through Hillegass' book, so I understand how the clipboard works, just not how to get the portion of the image out of the view... Now, I'm starting to think that I made a mistake in basing my project on IKImageView, but it's what Preview is built on (or so I've read), so I figured it had to be stable... and anyway, now it's too late, I'm too deep in this to start over... So, other than not using IKImageView, any suggestions on how to copy the select region to the clipboard manually?

    Read the article

  • IKImageView resize is blocky

    - by Brian Postow
    I am putting an image into an IKImageView, and immediately sizing it to fit. Whenever I do this, the image originally appears at 1-1 size (huge) and then resizes down, which would be fine if the animation was smooth. However, the animation looks ... fluttery? There are big blocks, like 2 inches square, of the image that appear and shrink independently of each other. The effect is a little annoying, and almost to the level where it might give an epileptic a seizure... (I'm exaggerating a little). Is this a bug in IKImageView? Is it a bug in the animation? Will it go away if I turn off the animation (How do I do that? setAnimates: NO doesn't seem to do anything, nor does overloading animates to return NO in my subclass... EDIT: addedcode: NSImage* image = [doc currentImage]; [imageView setImage: image]; [imageView zoomImageToFit: self]; This is in the app controller, so self is the application (or plugin, depending on which version I'm looking at)

    Read the article

  • Removing the image from an IKImageView

    - by Brian Postow
    I have an IKImageView that is coming up effectively un-initialized. This is happening effectively in an error-state (The user is unregistered) so I haven't had a chance to put an image in it yet. In 10.6, this comes up fine, with a black rectangle. In 10.5, however, it comes up with garbage. some rectangles of noise, some rectangles of copies of the desktop, etc. I've tried setting the ZoomFactor to 0.0, I've tried setting the image to nil, but it appears that the problem is beyond that. any ideas? (My next kludge is going to be to ship tiny blank image with the app, and try to get it to load that... but that's kind of silly)

    Read the article

  • IKImageView, Buttons work intermittently in 10.5 but ok in 10.6

    - by markhunte
    Hi all, In IB,I have connected some buttons to a IKImageView. Using its received Action 'ZoomIn:', 'ZoomOut:','ZoomImageToActualSize:' When I build for 10.6 I have no issues these work as expected. But in 10.5 (ppc), they sometimes work as expected and sometimes do not. I have even tried it programatically. But I get the same results. It is intermittent with each build after I have made some small change in IB that I need. But not changes that should affect how the view acts. The only buttons that seem to work through out are 'ZoomImageToFit' and the rotate ones. When the do not work as expected, I see no change to the current image in the view, but when my app (/s, I have had this issue before in different apps) changes the image The view reflects the last request from a button. So for example when it does not work. An image is displayed, I click the 'ZoomImageToActualSize:' button, nothing happens. I load a new image and it is displayed at Actual size. Example when it does work. An image is displayed, I click the 'ZoomImageToActualSize:' button, It is displayed at Actual size. By the way, I know I can reset the view default , before I load a new image. Also if I run the 10.5 app in 10.6, it works ok, but as above I get intermittent results with the same build on multible 10.5 machines. Does anyone know what is going on, is this a known bug? Thanks for any help. MH

    Read the article

  • Turning an NSImage* into a CGImageRef?

    - by Brian Postow
    Is there an easy way to do this that works in 10.5? In 10.6 I can use nsImage CGImageForProposedRect: NULL context: NULL hints: NULL If I'm not using 1b black and white images (Like Group 4 TIFF), I can use bitmaps, but cgbitmaps seem to not like that setup... Is there a general way of doing this? I need to do this because I have an IKImageView that seems to only want to add CGImages, but all I've got are NSImages. Currently, I'm using a private setImage:(NSImage*) method that I'd REALLY REALLY rather not be using...

    Read the article

  • Undocumented Mac Calls

    - by Brian Postow
    I'm working on a couple of mac products, and in order to do what I need to do, I'm using some calls to undocumented methods on Mac Classes. Like IKImageView's doRotate:(id) and PDFDocument's (NSPrintOperation *)getPrintOperationForPrintInfo:(NSPrintInfo *)printInfo autoRotate:(BOOL)doRotate; How common is it for Objective C programmers to use methods like this? How do you find out about them (other than Google)? How dangerous is it to use them? Is there a danger other than that Apple will make them no-longer available in some future rev, and so your program will break?

    Read the article

1