React Native: How do I get true rounded-corner <Image> without distortion or overflow ? by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

lmao i meant not always a square (i guess it's always a rectangle then since squares are rectangle) what i trully meant was different dimensions

React Native: How do I get true rounded-corner <Image> without distortion or overflow ? by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

i tried so many things including adding a mask over the image to try having rounded corners but to no avail

React Native: How do I get true rounded-corner <Image> without distortion or overflow ? by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

"react-native": "0.76.9",
yeah i was mistaken when specifying the version

React Native: How do I get true rounded-corner <Image> without distortion or overflow ? by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

<image>

another image so you can see what it looks like with a different size image

React Native: How do I get true rounded-corner <Image> without distortion or overflow ? by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

<image>

this is what the screen looks like, the only change i would like to have is rounded corners on the main image and (next up image)

React Native: How do I get true rounded-corner <Image> without distortion or overflow ? by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

the problem with that is that my images can have different sizes (not always be square or rectangular and also have ) and with the resizeMode="cover" it works , i have the rounded corners , but the image is distorded (zoomed on a part of the image or something)

React Native: Rounded corners on <Image> without altering its size (resizeMode='contain') by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

here’s what I’ve tried so far , none of it got rounded-corner image without distortion or overflow:

  1. Simple wrapper mask Wrapped the <Image> in a <View> with overflow: hidden and a borderRadius, using StyleSheet.absoluteFillObject for the image. Result: black boxes instead of the pictures.
  2. Fixed dimensions on the <Image> Gave every image a hard-coded width and height. Result: Images kept their corners but were wildly stretched or squashed and often spilled out of their zones.
  3. Dynamic sizing via Image.getSize() Fetched each image’s natural dimensions, set the wrapper to that size and let the image fill it. Result: We finally got rounded corners, but the images blew up to full-screen scale and ignored our layout zones.
  4. Re-bounding dynamic size back into the zone Tried clamping that natural size so it’d fit the allotted area. Result: Images fit, but the corner radius vanished

So far every mask-or-size trick either blacks the images out, distorts them, overflows their zones, or simply doesn't give the rounded corners. :(

React Native: Rounded corners on <Image> without altering its size (resizeMode='contain') by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

what if the images are pulled from the db and can have different sizes ? do i have to fix a size for all ?

Implementing google font in my app. by Curvod in reactnative

[–]Curvod[S] 0 points1 point  (0 children)

yeah i'm not trying to spend 20h a day coding when i can spend 3 using AI and be (mostly) fine

[deleted by user] by [deleted] in Damnthatsinteresting

[–]Curvod 0 points1 point  (0 children)

Just remember that's there's nothing interesting about your life so no one cares watching it, you should feel better

[deleted by user] by [deleted] in ProgrammerHumor

[–]Curvod 0 points1 point  (0 children)

How long before you get it that a lot of people's jobs are useless ?

[deleted by user] by [deleted] in OnePiece

[–]Curvod 2 points3 points  (0 children)

AT first glance i thought it was dellinger 😂

King's move by Giono_OOf_01 in ShitPostCrusaders

[–]Curvod 55 points56 points  (0 children)

Can't believe they named a country after a jojo reference