question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS/macOS Images not cropped inside of a Frame

See original GitHub issue

Description

Screen Shot 2022-04-27 at 7 03 50 PM

Take https://github.com/dotnet-presentations/dotnet-maui-workshop/tree/main/Finish and run on iOS or mac catalyst

                <Frame
                    Grid.RowSpan="2"
                    Grid.Column="1"
                    Margin="0,80,0,0"
                    HeightRequest="160"
                    WidthRequest="160"
                    HorizontalOptions="Center" 
                    Padding="0"
                    CornerRadius="80">
                    <Image
                        Aspect="AspectFill"
                        HeightRequest="160"
                        HorizontalOptions="Center"
                        VerticalOptions="Center"
                        Source="{Binding Monkey.Image}"
                        WidthRequest="160"/>
                </Frame>

This should crop like it does on Android/Windows.

Steps to Reproduce

See above^

Version with bug

Release Candidate 2 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

All

Did you find any workaround?

Have to set

       IsClippedToBounds="True"

This should be consistent though between all platforms

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kristinx0211commented, Apr 28, 2022

@jamesmontemagno ok, thanks for your update. remove the setting IsClippedToBounds="True", can see the image not cropped inside of a Frame.

0reactions
tj-devel709commented, Nov 1, 2022

Similar results with MacCatalyst and iOS

With IsClippedToBounds

image

Without IsClippedToBounds

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crop and straighten photos in Photos on Mac
In Photos on your Mac, crop a photo to improve its composition or remove unwanted areas. Straighten photos that were taken at an...
Read more >
ios - Crop image according to frame of any View
I think the simplest way to achieve it is the following: extension UIImage { func crop(to rect: CGRect) -> UIImage?
Read more >
How To Crop Photos and Videos In iMovie - YouTube
https://macmost.com/e-2637 When you add a photo to an iMovie project, the photo will rarely fit right into the video frame but will instead ......
Read more >
How To Crop Photos On iPhone / iPad - YouTube
Your iPhone has a built in photo editor that can easily crop any ... These photos are cropped inside the Photos app on...
Read more >
How to Crop an Image in Mac OS X with Preview
Cropping a Picture with Preview in Mac OS X. Open the image file you want to crop into the Preview app in Mac...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found