For questions related to the UIImageJPEGRepresentation method for the UIImage class on the iOS platform, a method commonly used to convert images to JPEG.
Questions tagged [uiimagejpegrepresentation]
91 questions
0
votes
1 answer
Uploading UIImage to server using UIImageJPEGRepresentation
I'm writing an app which uploads a UIImage to my server. This works perfect, as I see the pictures being added. I use the UIImageJPEGRepresentation for the image data and configure an NSMutableRequest. ( setting url, http method, boundary, content…

Thomas Joos
- 2,451
- 5
- 26
- 30
0
votes
3 answers
IOS 7 screenshot tweak
I'm trying to create a screenshot tweak for iOS 7 but all i am able to save is a blank image.
This is my code:
UIView *screenshotView = [[UIScreen mainScreen] snapshotViewAfterScreenUpdates:NO];
…

gerula
- 1
0
votes
1 answer
iPhone SDK : Multiple images upload to server with SOAP request
I know very well that you may count this thread as duplicate just because multiple times this question was asked in different ways. I did not find any solution from the existing questions on this forum and thus i'm going to make a new thread.
Here,…

Nilesh Prajapati
- 301
- 3
- 9
0
votes
2 answers
UIImagePickerController show correct image until I save the image
I am getting a UIImage with UIImagePickerController. After getting the image, I set it as the background of a UITableView. The image looks exactly as I took it. But then if I save the image to my server and then load the image back. Whether I save…

Katedral Pillon
- 14,534
- 25
- 99
- 199
0
votes
1 answer
UIImagePickerController corrupts image
I'm working on an app and I need to get bytes from an UIImage.
For the moment, I use UIImagePickerController, and get the UIImage like this,
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
and then get data from UIImage…

Rievo
- 79
- 4
0
votes
1 answer
UIImage orientation issue when calling UIImageJPEGRepresentation
I have a UIImage which comes from the Camera Roll. I have the following code:
UIImage *img = [UIImage imageWithCGImage: [[asset defaultRepresentation] fullResolutionImage]];
return UIImageJPEGRepresentation(img, 1.0);
When I view img in an…

Jacob Joz
- 732
- 1
- 11
- 29
0
votes
3 answers
-base64Encoding return type defaults to id
In my application when i try with following coding i get the warning as
Code
[UIImageJPEGRepresentation(petAvadar.image, 1.0)base64Encoding]
WARNING
Instance method '-base64Encoding' not found (return type defaults to 'id')
How to remove this…

Fazil
- 1,390
- 2
- 13
- 26
0
votes
3 answers
JPEG compression
I'm trying to understand the JPEG compression process and performed the following steps to verify a few things.
I take an input image img1.jpg and compress it by using IrfanView, say quality=50 (img1_compress.jpg).
Then I crop a small block from the…

pree
- 2,297
- 6
- 37
- 55
0
votes
1 answer
UIImageJPEGRepresentation and crappy image
After trying I was able to upload an image taken from the camera to my webserver.
But what I do no understand is why the image quality is crappy, low resolution, very few colors. Is there a way to get a better quality ?
here is my code :
NSURL…

user1961175
- 19
- 1
- 4
0
votes
1 answer
Converting a UIImage to jpeg/png file for sharing using AddThis Plug-in
I want to convert a UIImage into a format such as a jpeg or png so that I can then share that file using the IOS plug-in called "AddThis".
I tried to share it using just the UIImage but the plug-in doesn't support it so I need to find a way to…

Ollie177
- 315
- 1
- 3
- 17
-1
votes
1 answer
How to save and retrieve UIImages using "imageWithData" maintaining proper image format?
I'm working on creating and storing OpenGL ES1 3D models, and want to include image files to be used as textures, within the same file as the 3D model data. I am having trouble loading the image data in a usable format. I'm using…

Jon L.
- 31
- 2
-1
votes
1 answer
Downgrade UIImage to 1MB in swift
UIImageJPEGRepresentation is great function to downgrade the image.
I am just looking for downgrade the image to 1MB.
Yes there is a loopy way that we can apply multiple check until we receive 1024KB data count.
let image = UIImage(named:…

Ramesh
- 147
- 1
- 17
-1
votes
3 answers
How to get image size in KB or Mb from image picker?
I'm facing some issue to get image size in my code here is what I'm doing:
let imageData : NSData = UIImageJPEGRepresentation(images[0], 1) as! NSData
let formatter = ByteCountFormatter()
formatter.allowedUnits = .useKB
formatter.countStyle =…

phadte viraj
- 67
- 2
- 7
-1
votes
1 answer
UIImageJPGRepresentation and UIImagePNGRepresentation crash
I have a ImagePicker and selecting on the image I want to upload it.
For that I need to UIImage toNSData.
I have used UIImagePNGRepresentation and UIImageJPEGRepresentation. But both of the cases the app crash.
It works well for simulator but it…

Sajib Ghosh
- 410
- 1
- 6
- 17
-1
votes
1 answer
Invalid type for key imagem1, expected file, but got string
I tried to use UIImagePNGRepresentation but when i upload the images to Parse they are too big, but the small images were working fine. For that reason i tried to use UIImageJPEGRepresentation, but it doesnt matter if the image is big or small,…

Renato Pimpão
- 271
- 3
- 17