Questions tagged [uiimagejpegrepresentation]

For questions related to the UIImageJPEGRepresentation method for the UIImage class on the iOS platform, a method commonly used to convert images to JPEG.

91 questions
2
votes
0 answers

UIImagePickerController and the need to save the UIImage asap vs. exploiting the file backing

I've read uiimagepickercontroller uiimage memory and more and other relevant questions, but I can't get my head around one thing, and I wonder if there are people around here with experience on this particular aspect. In my app I let the user select…
2
votes
1 answer

Xcode NSData Image Size Change

I want to save an image. Therefore I convert it to a NSData. However during these steps the width and height of the image will change. It is increased in size. This happens on the iPad Air series, before the width/height remained the…
Vincent
  • 4,342
  • 1
  • 38
  • 37
2
votes
0 answers

How to convert a Bitmap into hex data

I'm trying to convert an image into hexadecimal data for a http POST. On the iOS version I achieved this in 2 minutes with one line of code using UIImageJPEGRepresentation. I have spent 2 days trying to achieve the same in Java with a Bitmap image…
David P
  • 617
  • 1
  • 15
  • 26
2
votes
4 answers

Take snapshot / screenshot of whole UIView - iPhone

I am trying to take a screenshot/snapshot of a UIView. I am able to get the a screenshot with the code below of the current visible view - but i am after the whole view. The view is a scrollview so there is content below that isnt visible that i…
Dan
  • 1,447
  • 2
  • 14
  • 30
1
vote
2 answers

Transparent UIImage in iphone app's Document folder

As i am saving a image which has transparent part but while saving it in Document folder, the transparent part changed to white. Below is the code .... NSData *dataPhoto = UIImageJPEGRepresentation(imageBigPhoto, 1.0); //NSData *dataPhoto =…
Injar
  • 125
  • 1
  • 4
  • 12
1
vote
1 answer

Swift UIImage .jpegData memory leak issue

I have some code that accepts a UIImage in and saves that image to disk. This code is iterated over for multiple images. I noticed that for each time the code runs, I have a memory leak that persists until the view is removed. I tracked the issue…
1
vote
0 answers

iOS 4 Image Oriented Incorrectly When Posted To Server

I am a relatively new iOS developer. I am attempting to build an app that uploads images to a server. However, when I get the image with metadata, the orientation is always off. Here is the code I am using: - (void)getJPEGFromAssetForURL:(NSURL…
1
vote
1 answer

how UIImageJPEGRepresentation() works

A 700x700 png image, shows imageview cost of 1.88Mib memory, but if I compress it with UIImageJPEGRepresentation(data, 0.9), the memory cost decreases to 736Kib but the image size unchanged, the jpg pixel has no alpha, but the cost of memory…
so.me
  • 21
  • 4
1
vote
0 answers

Reduce size of full screen image

I have an app with a "Snapchat-style Camera" (i.e. you take a picture and then overlay text and emojis). I am currently reducing the resolution to 1080 x 2040 and then converting to jpegRepresentation with a quality of 0.75. This is still giving me…
1
vote
1 answer

How to send an image(UIImage) from a SWIFT ios client program to a JAVA server program?

My Question: How to properly convert and send images from ios swift client app to a java server?( without using much of external sdks) Which type of sockets to use in swift(I am new to swift and can't really find ANY suitable socket) ? Please give…
1
vote
0 answers

FBSimulatorControl : Convert CVPixelBufferRef data to jpeg data for streaming

I am developing a CLI in swift and using FBSimulatorControl in it. I want to stream the data obtained from consumeData: delegate method. As per the data obtained in the method is data obtained from CVPixelBufferRef I logged an issue in the github…
Aravind G S
  • 392
  • 3
  • 17
1
vote
1 answer

UIImageJpgRepresentation doubles image resolution

I am trying to save an image coming from the iPhone camera to a file. I use the following code: try UIImageJPEGRepresentation(toWrite, 0.8)?.write(to: tempURL, options: NSData.WritingOptions.atomicWrite) This results in a file double the resolution…
tishu
  • 998
  • 15
  • 29
1
vote
2 answers

Grabbing Image Saved from UIImagePickerController?

I'm trying to load an image from the documents path, in my case is showing as file:///var/mobile/Containers/Data/Application/AE7B9E43-E92D-4029-AE8D-4500CB61C15D/Documents/uploadImage.jpg. How would I get that image back so it can be sent out using…
1
vote
1 answer

UIImageJPEGRepresentation | generateJPEGRepresentation saves image as nil? Swift 3

I am currently designing a database management application with Realm, where I have managed to create and retrieve an object successfully. The problem I am having is with updating/editing - specifically updating the UIImage that the user has…
creatando
  • 25
  • 1
  • 4
1
vote
2 answers

how to upload UIImage on server?

I am new to iphone, Is it possible to upload uiimage on server without using any php or other files. I got may examples of uploading image by sending request to some php file. But i don't wants to use php files. I have server path and Upload folder…
Hardik Patel
  • 937
  • 3
  • 14
  • 39