Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:05:48+00:00 2026-06-06T19:05:48+00:00

I have two ImageViews, one called imageView and the other called subView (which is

  • 0

I have two ImageViews, one called imageView and the other called subView (which is a subview of imageView).

I want to blend the images on these views together, with the user being able to switch the alpha of the blend with a pan. My code works, but right now, the code is slow as we are redrawing the image each time the pan gesture is moved. Is there a faster/more efficient way of doing this?

BONUS Q: I want to allow for my subView image to drawn zoomed in. Currently I’ve set my subView to be UIViewContentModeCenter, however I can’t seem to draw a zoomed in part of my image with this content mode. Is there any way around this?

My drawrect:

- (void)drawRect:(CGRect)rect
{
float xCenter = self.center.x - self.currentImage1.size.width/2.0;
float yCenter = self.center.y - self.currentImage1.size.height/2.0;

subView.alpha = self.blendAmount;  // Customize the opacity of the top image.

UIGraphicsBeginImageContext(self.currentImage1.size);

CGContextRef c = UIGraphicsGetCurrentContext();

CGContextSetBlendMode(c, kCGBlendModeColorBurn);
[imageView.layer renderInContext:c];

self.blendedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.blendedImage drawAtPoint:CGPointMake(xCenter,yCenter)];

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:05:50+00:00Added an answer on June 6, 2026 at 7:05 pm

    You need to use GPU for image processing which is far faster than using CPU (as you’re doing right now).

    You can use Core Image framework which is very fast and easy to use but requires iOS 5, or you can use Open GL directly but you need to be experienced and have some knowledge about Open GL Shading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a layout that contains two ImageViews. I want one of them to
I have two DropDownListBoxes one is called ddlDay and the other is ddlMonth. As
In a ViewGroup I want to put two ImageViews overlapping: The imageview A have
I have two images that I want to merge into one. (Eg House.png on
I want to have three images in one row, and a Video or two
I have a activity where I have two imageViews. In onTouch I recognize which
I have Two Image Views Defined in Xml. I want to Change the Position
I am creating an app, in which I have two small imageview (using have
I have list with items having two textview and one imageview.I inflate the list
I have a layout containing two textViews and one ImageView. the first text is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.