web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / crop image from center
Power Apps
Suggested Answer

crop image from center

(0) ShareShare
ReportReport
Posted on by 320 Moderator
hi
 
I need to crop a picture taken from powerapp. 
 
 
 
 
How to crop from center and show user if it is okay to use?
Categories:
I have the same question (0)
  • Suggested answer
    Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at
    Hi,
     
    Power Apps does not have direct image manipulation capabilities (like cropping), but you can simulate cropping by:
        - Overlaying a rectangle to define the cropped area.
        - Using a gallery or container to display only the cropped portion of the image.
     
    Step 1: Add Controls
    1. Add Picture Control:
       - Insert the Add Picture Control to allow the user to upload an image.
       - Set the `Image` property of the control to display the uploaded image.
    2. Add a Rectangle to Define the Cropped Area:
       - Insert a rectangle shape (or use a container) to visually represent the cropped area.
       - Position the rectangle in the center of the image.
     
    Step 2: Crop the Image
    To crop the image from the center:
    1. Calculate the dimensions of the cropped area:
       - Define the width and height of the cropped area (e.g., 200x200 pixels).
       - Calculate the center of the image using its dimensions.
       Example formula for cropping dimensions:
       CropWidth = 200;
       CropHeight = 200;
       CropX = (Image.Width - CropWidth) / 2;
       CropY = (Image.Height - CropHeight) / 2;
    2. Use a gallery or container to display the cropped portion:
       - Insert a Gallery Control or Image Control.
       - Set the `Image` property to display only the cropped portion of the image.
     
    Step 3: Preview the Cropped Image
    1. Add a Preview Button:
       - Insert a button labeled "Preview Cropped Image."
       - When clicked, display the cropped image in a separate container or screen.
    2. Add a Confirmation Button:
       - Insert a button labeled "Use This Image."
       - When clicked, save the cropped image to a variable or collection for further use.
     
     
    Thanks!
     
    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard