Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-21-2010, 08:09 PM   #1 (permalink)
Registered Member
 
DenVog's Avatar
 
Join Date: Jan 2009
Location: Silicon Valley, USA
Posts: 622
Unhappy Image Sent from App 4x LARGER than Camera Roll

I have an app that combines a graphic with a photo from the built-in camera to create a single composite image. I'm using UIImageJPEGRepresentation and setting the dimensions to 600 x 800 for the final image. After saving the image to the camera roll, users have the option of using MailComposer to send it somewhere.

The image saved to the Photos App Camera Roll is:
591 x 800, 106 KB jpg.

Using MailComposer to email the image from within the app:
600 x 800, 438 KB jpg.

It should be the same image! Why is the photo in the camera roll 591 instead of 600? Why is the photo sent from the MailComposer 4x as large?!

I'd really appreciate if someone can shed light on this. I've tried a couple different implementations and get the same result.
DenVog is offline   Reply With Quote
Old 01-21-2010, 09:29 PM   #2 (permalink)
Registered Member
 
DenVog's Avatar
 
Join Date: Jan 2009
Location: Silicon Valley, USA
Posts: 622
Question UIImageWriteToSavedPhotosAlbum Compression

Does anyone know what compression level UIImageWriteToSavedPhotosAlbum uses for a JPEG saved to the camera roll? I've looked in the docs and forums, but can not find it listed. I assumed it was 1.0, but if it's not it would explain the difference in file size (KB).

Still don't understand the dimension 591 vs. 600 difference.
DenVog is offline   Reply With Quote
Old 01-22-2010, 01:12 PM   #3 (permalink)
Registered Member
 
DenVog's Avatar
 
Join Date: Jan 2009
Location: Silicon Valley, USA
Posts: 622
Default

Quote:
Originally Posted by DenVog View Post
Does anyone know what compression level UIImageWriteToSavedPhotosAlbum uses for a JPEG saved to the camera roll?
I've not been able to find an official answer to this, but through trial and error my file sizes end up very close to the same if I use .7 for the UIImageJPEGRepresentation compressionQuality setting.

I've exhausted my troubleshooting to understand why the camera roll photo saves at 591x800 instead of 600x800. Any suggestions would be very much appreciated.
DenVog is offline   Reply With Quote
Reply

Bookmarks

Tags
uiimagejpegrepresentation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 157,863
Threads: 88,915
Posts: 379,298
Top Poster: BrianSlick (7,072)
Welcome to our newest member, SalacL1
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:01 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0