42 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
0
answers
68
views
How to resolve "Hang Risk" using UIGraphicsImageRenderer from the main thread but only on macOS via Mac Catalyst?
I have some UIKit code that makes use of UIGraphicsImageRenderer to create an image from another image. This code is called from the main thread. When the app is run on iOS, there is no issue. But ...
0
votes
1
answer
98
views
How to scale crop and cut the UIImage to a circle in Swift using UIGraphicsImageRenderer?
Currently i am using the following swift code for scaling cropping and making a circular image out of the passed UIImage . Everything is working until iOS 18 but after that i can observe crashes . I ...
0
votes
1
answer
52
views
ImageRenderer omits curved text - Bug?
I am using the CrookedText library to generate curved text around a circle.
My app is supposed to print the image that is generated via ImageRenderer, but fails to include the curved text, although it ...
0
votes
1
answer
60
views
UIBezierPath stroke with alpha issue / artifact
I need to draw a curve with a translucent color. But if the curve contains many points, then you can get a strange effect. How to get rid of it?
UIBezierPath * bezierPath = [ UIBezierPath bezierPath ]...
1
vote
1
answer
876
views
UIGraphicsImageRenderer returned blank image in SwiftUI
In SwiftUI, I would like to take a screenshot of a subview called ExtractedView. I'm using UIGraphicsImageRenderer to render the view as an image. However, when ExtractedView is too long, I encounter ...
0
votes
0
answers
115
views
When saving a SwiftUI view as an image, the content is reduced and there is an unnecessary background that appears
My view doesn't have a black background when displayed, but after saving it as an image, the content of the view is reduced, and a black background appears above it.
View display on iPhone
Export ...
-1
votes
1
answer
294
views
Render text over image in several lines
I am working on a Swift project where I need to add a rotated watermark text to an existing UIImage. I have implemented a function that uses UIGraphicsImageRenderer to draw the image and apply the ...
1
vote
1
answer
6k
views
How do I prevent UIGraphicsImageRenderer.image() from crashing when using UIImage.draw() to draw a large image into the context?
Working in Swift, I am trying to implement some cropping and other simple edits to full resolution photos for my iOS app. However, when I try to draw a full size image into the context, it crashes due ...
1
vote
1
answer
91
views
UIGraphicsImageRenderer does not see some content on PDFPage
I use code from huckingwithswift.com as it is:
private func imageFromPDF(page: CGPDFPage) -> UIImage {
let pageRect = page.getBoxRect(.mediaBox)
let renderer = UIGraphicsImageRenderer(size: ...
0
votes
0
answers
171
views
Why image from UIGraphicsImageRenderer used with PDFPage is faded?
This is how I create PDFDocument:
let document = PDFDocument()
for image in images {
let page = PDFPage(image: image.scaledWithMaxWidthOrHeightValue(value: 425)!)!
document.insert(page, at: ...
0
votes
0
answers
262
views
UIGraphicsImageRenderer: iosurface is too large for GPU
I use UIGraphicsImageRenderer to draw a large image, but the Xcode logging Metal API Validation Enabled and [Metal] 5073 by 8663 iosurface is too large for GPU. The resulting image is a blank image ...
0
votes
1
answer
393
views
Can't get CALayer or UIView from SwiftSVG to render to UIImage with UIGraphicsImageRenderer()
I'm trying to render a CALayer from SwiftSVG package (on github) as a UIImage. It isn't working.
Source .svg file defines a viewBox 1169 x 1000.
If I add CALayer to UIView and add UIView (not UIImage) ...
0
votes
1
answer
73
views
overwrite set system properties at runtime in maven pom
I am using org.eclipse.images.renderer plugin to render my images from svg to png. Eclipse has provided support to create highDpi icons as well which requires 2 more arguments to be passed
eclipse.svg....
2
votes
2
answers
1k
views
SwiftUI ImageRenderer, render Path to image
I'm trying to make a simple drawing app in swift, iOS.
So i've managed to draw using Path(). Now i want to save an image of what i've drawn.
I have found on apple docs that ImageRenderer() is the ...
3
votes
0
answers
210
views
UIGraphicsImageRenderer and UIGraphicsBeginImageContext: What is useful for UIImage.draw(in: CGRect)
I am newbie in swift and wanted to use UIImage.draw(in: CGRect) in my application to resize image. When I used UIGraphicsImageRenderer, it made some memory spikes rather than using ...