Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not masking #1

Closed
mikaelhellqvist opened this issue Oct 18, 2013 · 6 comments
Closed

Image not masking #1

mikaelhellqvist opened this issue Oct 18, 2013 · 6 comments

Comments

@mikaelhellqvist
Copy link

Hi,

just downloaded your masking code. Can't seem to get it to work. No matter how I try, it won't mask the images.

Attach the images that I try with here.

appleinc_logo_mask
appleinc_logo

I'm using Xcode 5.0 and Mavericks.
any ideas?

@mdamjanic7
Copy link
Owner

I've just created a sample project using the latest Xcode under Mavericks, and it seems to work. Just add the two files into the project, the original image, the mask, and this line:

self.maskedImageView.image = [[NSImage imageNamed:@"apple.jpg"] maskUsingMaskImage:[NSImage imageNamed:@"mask2.jpg"]];

Original:
apple

Mask:
mask2

Result:
screen shot 2013-10-24 at 2 52 49 pm

@mikaelhellqvist
Copy link
Author

This is really weird. I must be doing something fundamentally wrong. Here is screen dumps from the code. I used your images and your code...

The mask:
mask

The result:
result

@mdamjanic7
Copy link
Owner

I know this is going to sound strange, but try checking the result in the actual application, and not in the Xcode preview.

@mikaelhellqvist
Copy link
Author

Yes, I've done that. This was just for because I wanted to show you. It's probably nothing wrong with your code. I'll investigate further. It's weird though, because it's pretty straight forward.

@mikaelhellqvist
Copy link
Author

Just wanted to confirm that it works. And it does. Just made a new clean project and tested it again and it works fine, so the problem lies in my code.

Thanks for your code and your help! Really appreciate it!

@mdamjanic7
Copy link
Owner

Awesome! Glad it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants