uiimage Questions

8

Solved

I want to take an image and invert the colors in iOS.
Nocuous asked 12/7, 2011 at 23:40

2

Solved

Is NSKeyedArchiver appropriate to convert UIImage to Data? do { let data = try NSKeyedArchiver.archivedData(withRootObject: UIImage(named: somePath), requiringSecureCoding: true) ... } catch { ...
Coaptation asked 16/5, 2020 at 0:5

22

I've found this code: func screenShotMethod() { //Create the UIImage UIGraphicsBeginImageContext(view.frame.size) view.layer.renderInContext(UIGraphicsGetCurrentContext()) let image = UIGraphi...
Obla asked 22/8, 2014 at 14:3

12

Solved

Please give ideas for how to crop UIImage on oval shape or circle shape. Please share your ideas.
Color asked 30/6, 2011 at 6:5

10

Solved

I need to get a UIImage only instead of loading a normal UIImageView with Kingfisher library To realize it I implemented a workaround with UIImageView: let imageView = UIImageView() imageView.k...
Lucilius asked 4/2, 2016 at 15:10

7

Solved

I'm trying to load a PDF file stored in Resources into a UIImage/UIImageView object in the iPhone SDK. Is this at all possible without converting the PDF to an image? If not, what are the member fu...
Baloney asked 1/3, 2010 at 21:25

3

Solved

I know there are several other ways to do this; I don't want to import anything that I don't need to. If someone can help me with his code, that would be great. Currently, it is only saving the or...
Eryn asked 29/1, 2016 at 18:6

39

Solved

I'd like to load an image from a URL in my application, so I first tried with Objective-C and it worked, however, with Swift, I've a compilation error: 'imageWithData' is unavailable: use object c...
Swiercz asked 15/6, 2014 at 16:27

13

Solved

I want to cut a UIImage into a circle so that I can then use it as an annotation. Every answer on this site that I've found describes creating an UIImageView, then modifying that and displaying it,...
Unaffected asked 14/3, 2015 at 7:29

2

Solved

I have a button with a)Image and b)Background Image - all built in a storyboard. The image is popping out of button as background image has a different shape. I want to give the actual image (a) so...
Wanyen asked 17/2, 2018 at 21:36

6

How I can convert a SwiftUI Image to a UIImage? let image = Image(systemName: "circle.fill") let UIImage = image as UIImage
Browband asked 14/7, 2019 at 14:54

22

I have an image called arrowWhite. I want to colour this image to black. func attachDropDownArrow() -> NSMutableAttributedString { let image:UIImage = UIImage(named: "arrowWhite.png")! let at...
Spiegleman asked 4/8, 2015 at 7:28

5

Solved

I'm trying to cut an transparent square in a UIImage, however I honestly have no idea where/how to start. Any help would be greatly appreciated. Thanks!
Modal asked 4/5, 2014 at 3:4

3

I'm developing an app for iPhone using a coverFlow view, when the app is building the cards it is using a UIView in order to add labels and other stuff. Then I convert the UIView into UIImage using...
Bashaw asked 21/11, 2009 at 16:2

9

Solved

I have looked around and have been unsuccessful at figuring out how take text, overlay it on an image, and then combine the two into a single UIImage. I have exhausted Google using the search term...
Sandalwood asked 6/3, 2015 at 20:16

3

Solved

I am trying to generate an UIImage from custom text in Swift3. Using iOS Controls, It's possible to create an UIImage, below is the code: class func imageWithText(txtField: UITextField) -> UII...
Muscovado asked 29/6, 2018 at 10:55

18

Solved

I want to customize my app's look by using a logo image as the navigation bar's title, instead of plain text. When I use this code let logo = UIImage(named: "logo.png") self.navigationItem.titleVi...
Selenography asked 17/7, 2014 at 12:9

3

Solved

I've read through multiple threads concerning the topic but my problem still persists. When I'm resizing an Image with following code: extension UIImage { func thumbnailWithMaxSize(image:UIImage,...
Butte asked 6/9, 2017 at 10:34

2

Solved

I'm trying to present an instance of UIImage, generated as a barcode from a string: if let image = UIImage(barcode: "1234567890") { Image(uiImage: image) } But it shows empty rectangle,...
Bombsight asked 7/9, 2020 at 13:26

18

Solved

My code works fine for normal devices but creates blurry images on retina devices. Does anybody know a solution for my issue? + (UIImage *) imageWithView:(UIView *)view { UIGraphicsBeginImageCon...
Faiyum asked 2/12, 2010 at 11:2

5

Solved

I tried to create a UIImage from a SwiftUI view, a snapshot, with the code from HWS: How to convert a SwiftUI view to an image. I get the following result, which is obviously incorrect because the ...
Likely asked 2/9, 2021 at 17:6

2

With Xcode 12 release, now SVG assets are supported. It is fine if I want to use SVG in my asset catalog. But it doesn't work when I try to load it from an URL any idea? let downloadURL = URL.init(...
Arsenical asked 12/12, 2020 at 15:52

4

Solved

As you know the iPhone guidelines discourage loading UIImages that are greater than 1024x1024. The size of the images that I would have to load varies, and I would like to check the size of the ima...
Conard asked 12/11, 2010 at 22:33

15

Solved

I want to programmatically create an UIImage filled by a solid color. Anyone have an idea of how to do this in Swift?
Antoninus asked 24/10, 2014 at 5:31

14

Solved

I was trying to upload an image file to Parse after taking photo directly on phone. But it throws an exception: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '...
Zoogeography asked 19/4, 2015 at 6:36

© 2022 - 2024 — McMap. All rights reserved.