@

Home 

2014/10/15 U 10:10:42

iphone Programming Glossary: jpeg

iOS Image Orientation has Strange Behavior

http://stackoverflow.com/questions/10600613/ios-image-orientation-has-strange-behavior

Correct way to load image into UIWebView from NSData object

http://stackoverflow.com/questions/2827891/correct-way-to-load-image-into-uiwebview-from-nsdata-object

it to disk iphone uiwebview nsdata share improve this question I tested the code with PNG image png JPG image jpeg and GIF image gif and it works as expected webView loadData imageData MIMEType imageMIMEType textEncodingName nil baseURL..

How exactly to make a CGImageRef from an image on disk

http://stackoverflow.com/questions/3550201/how-exactly-to-make-a-cgimageref-from-an-image-on-disk

a JPG from the disk into a CGImageRef. Also for bonus points is there anyway to load a GIF into a CGImageRef iphone jpeg quartz graphics gif cgimage share improve this question gcamp is more or less correct you are pretty safe to use this..

Catching error: Corrupt JPEG data: premature end of data segment

http://stackoverflow.com/questions/3848280/catching-error-corrupt-jpeg-data-premature-end-of-data-segment

tried with a try catch block but it does not catch the error. Is there any way to catch the error iphone uiimage jpeg share improve this question Depends on how you are getting the data etc. Maybe this is what you are looking for iphone.. this question Depends on how you are getting the data etc. Maybe this is what you are looking for iphone corrupt jpeg data for image received over http A simple way to check if the JPEG data is complete or not is to check the first and last..

When to use PNG or JPG in iPhone development?

http://stackoverflow.com/questions/3929281/when-to-use-png-or-jpg-in-iphone-development

much smaller I'd rather be using that. Are there any guidelines which format to use and in which case iphone ios png jpeg share improve this question PNG's are pixel perfect non lossy and require very little extra CPU energy to display. However..

Finding image type from NSData or UIImage

http://stackoverflow.com/questions/4147311/finding-image-type-from-nsdata-or-uiimage

byte NSString contentTypeForImageData NSData data uint8_t c data getBytes c length 1 switch c case 0xFF return @ image jpeg case 0x89 return @ image png case 0x47 return @ image gif case 0x49 case 0x4D return @ image tiff return nil share improve..

Problem setting exif data for an image

http://stackoverflow.com/questions/5125323/problem-setting-exif-data-for-an-image

much a copy and paste of the code from the above blog. I am using this to write exif data to a captured image. NSData jpeg AVCaptureStillImageOutput jpegStillImageNSDataRepresentation imageDataSampleBuffer CGImageSourceRef source source CGImageSourceCreateWithData.. from the above blog. I am using this to write exif data to a captured image. NSData jpeg AVCaptureStillImageOutput jpegStillImageNSDataRepresentation imageDataSampleBuffer CGImageSourceRef source source CGImageSourceCreateWithData CFDataRef.. imageDataSampleBuffer CGImageSourceRef source source CGImageSourceCreateWithData CFDataRef jpeg NULL get all the metadata in the image NSDictionary metadata NSDictionary CGImageSourceCopyPropertiesAtIndex source 0 NULL..

Newbie having issues with uploading a file using ASIHTTPRequest

http://stackoverflow.com/questions/5319823/newbie-having-issues-with-uploading-a-file-using-asihttprequest

requestWithURL url Upload a file on disk request setData imageData withFileName filename andContentType @ image jpeg forKey @ userfile request setDelegate self request startAsynchronous ... void imagePickerController UIImagePickerController.. than 2000x2000 so reduce it and give a try. request setData imageData withFileName @ photo.jpg andContentType @ image jpeg forKey @ file and this is the php script. filename uploaded target_path uploads target_path target_path . filename. .jpg..

iOS UIImagePickerController result image orientation after upload

http://stackoverflow.com/questions/5427656/ios-uiimagepickercontroller-result-image-orientation-after-upload

to rotate the raw image data. There's a good chance that this flag is being saved to the exif data in the uploaded jpeg image but the program you use to view it is not honoring that flag. To rotate the UIImage to display properly when uploaded..

Determine MIME Type of NSData Loaded From a File

http://stackoverflow.com/questions/5996797/determine-mime-type-of-nsdata-loaded-from-a-file

NSURLProtocol. Part of the process involves loading an NSData object which could be anything from an html file to a jpeg image. NSURLProtocol requires setting a mimetype. Is there an API in the iPhone SDK to determine the mimetype of the file..

NSData and Uploading Images via POST in iOS

http://stackoverflow.com/questions/8042360/nsdata-and-uploading-images-via-post-in-ios

dataUsingEncoding NSUTF8StringEncoding body appendData NSString stringWithString @ Content Type image jpeg r n r n dataUsingEncoding NSUTF8StringEncoding body appendData imageData body appendData NSString stringWithFormat @ r n..

AFNetworking Uploading a file

http://stackoverflow.com/questions/8234186/afnetworking-uploading-a-file

^ id AFMultipartFormData formData formData appendPartWithFileData myNSDataToSend mimeType @ image jpeg name @ alleagto AFHTTPRequestOperation operation AFHTTPRequestOperation HTTPRequestOperationWithRequest myRequest success.. operation I get errors on the following lines formData appendPartWithFileData myNSDataToSend mimeType @ image jpeg name @ alleagto At the myNSDataToSend. And here AFHTTPRequestOperation operation AFHTTPRequestOperation HTTPRequestOperationWithRequest..

How to write exif metadata to an image (not the camera roll, just a UIImage or JPEG)

http://stackoverflow.com/questions/9006759/how-to-write-exif-metadata-to-an-image-not-the-camera-roll-just-a-uiimage-or-j

CFDictionarySetValue mutable kCGImagePropertyExifDictionary __bridge void EXIFDictionary NSData jpeg AVCaptureStillImageOutput jpegStillImageNSDataRepresentation imageSampleBuffer After this code you will have your image.. mutable kCGImagePropertyExifDictionary __bridge void EXIFDictionary NSData jpeg AVCaptureStillImageOutput jpegStillImageNSDataRepresentation imageSampleBuffer After this code you will have your image in the jpeg nsdata and the correspoding.. jpegStillImageNSDataRepresentation imageSampleBuffer After this code you will have your image in the jpeg nsdata and the correspoding dictionary for that image in the mutable cfdictionary. All you have to do now is CGImageSourceRef..

Get Exif data from UIImage - UIImagePickerController

http://stackoverflow.com/questions/9766394/get-exif-data-from-uiimage-uiimagepickercontroller

adata NSData alloc initWithBytesNoCopy buffer length image_representation.size freeWhenDone YES identify image type jpeg png RAW file ... using UTI hint NSDictionary sourceOptionsDict NSDictionary dictionaryWithObjectsAndKeys id image_representation..

iOS Image Orientation has Strange Behavior

http://stackoverflow.com/questions/10600613/ios-image-orientation-has-strange-behavior

a few days ago. My application modifies individual pixels of an image specifically the alpha channel of a PNG so any JPEG conversion gets thrown out of the window for my scenario . A few days ago I noticed that even though the image is displayed..

iOS: Get pixel-by-pixel data from camera

http://stackoverflow.com/questions/10865100/ios-get-pixel-by-pixel-data-from-camera

but I don't really see how. So Can this be done If so how Would I be getting raw image data or data that's been JPEG compressed iphone ios camera avfoundation pixel share improve this question AV Foundation can give you back the raw..

UIImagePickerController and extracting EXIF data from existing photos

http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

photo returned from the UIImagePickerController to a file on disk. I've explored file sizes but the original file is a JPEG whilst the returned image is a raw UIImage making it impossible to know the file size of the image that was selected. I'm.. a UIImage after taking a snapshot. In theory if we use the selected from the UIkit category for UIImage NSData UIImageJPEGRepresentation UIImage image CGFloat compressionQuality Then we can convert the UIImage into a NSData instance and then use.. image editingInfo NSDictionary editingInfo NSLog @ image picked @ with info @ image editingInfo NSData jpegData UIImageJPEGRepresentation image 0.5 EXFJpeg jpegScanner EXFJpeg alloc init jpegScanner scanImageData jpegData EXFMetaData exifData jpegScanner.exifMetaData..

How can I make my ad hoc iPhone application's icon show up in iTunes?

http://stackoverflow.com/questions/173247/how-can-i-make-my-ad-hoc-iphone-applications-icon-show-up-in-itunes

on that page The iTunes artwork your testers see should be your application s icon. This artwork must be a 512 x 512 JPEG or PNG file named iTunesArtwork . Note that the file must not have an extension . After generating the file of your application.. file and click Add. In the dialog that appears select the Copy items option and click Add. Note that the PNG or JPEG file is just 'iTunesArtwork' with no suffix. If you try to copy the file into the application bundle after you have built..

CGImage/UIImage lazily loading on UI thread causes stutter

http://stackoverflow.com/questions/1815476/cgimage-uiimage-lazily-loading-on-ui-thread-causes-stutter

UI thread when it first becomes visible. This puzzles me since my worker thread has explicit code for decompressing JPEG data. Anyway on a hunch I wrote some code to render into a temporary graphics context on the background thread and sure.. EXC_BAD_ACCESS. I have no idea what UIImage is actually doing behind the scenes. Perhaps it is decompressing the JPEG data. Anyway the method is void forceLazyLoadOfImage UIImage image CGImageRef imgRef image.CGImage CGFloat currentWidth..

MFMailComposeViewController image orientation

http://stackoverflow.com/questions/20204495/mfmailcomposeviewcontroller-image-orientation

original question. Here's the code as I showed it in the original question except that I am now sending the image as a JPEG rather than a PNG but this has made no difference. This is how I'm capturing the image with the imagePickerController and.. mailVC MFMailComposeViewController new NSArray aAddr NSArray arrayWithObjects gAddr nil NSData imageAsNSData UIImageJPEGRepresentation gImag mailVC setMailComposeDelegate self mailVC setToRecipients aAddr mailVC setSubject gSubj mailVC addAttachmentData.. CGFloat width CGImageGetWidth gImag.CGImage CGFloat height CGImageGetHeight gImag.CGImage NSData imageAsNSData UIImageJPEGRepresentation gImag mailVC setMailComposeDelegate self mailVC setToRecipients aAddr mailVC setSubject gSubj mailVC addAttachmentData..

CoreData : store images to DB or not?

http://stackoverflow.com/questions/2573072/coredata-store-images-to-db-or-not

image core data share improve this question First always store your images in a usable format such as PNG or JPEG instead of NSData. This will save you a lot of headaches. Second the rule for storing binary data is 100kb store in the..

iPhone SDK 4 AVFoundation - How to use captureStillImageAsynchronouslyFromConnection correctly?

http://stackoverflow.com/questions/3847140/iphone-sdk-4-avfoundation-how-to-use-capturestillimageasynchronouslyfromconnec

alloc init autorelease NSDictionary outputSettings NSDictionary alloc initWithObjectsAndKeys AVVideoCodecJPEG AVVideoCodecKey nil _stillImageOutput setOutputSettings outputSettings outputSettings release self setStillImageOutput.. . AVCaptureStillImageOutput only seems to work sensibly with AVCaptureSessionPresetPhoto otherwise you effectively get JPEG encoded video frames. Might as well use higher quality BGRA frames incidentally the camera's native output appears to be..

Catching error: Corrupt JPEG data: premature end of data segment

http://stackoverflow.com/questions/3848280/catching-error-corrupt-jpeg-data-premature-end-of-data-segment

error Corrupt JPEG data premature end of data segment When creating an UIImage with corrupt incomplete JPEG data the console will print out.. error Corrupt JPEG data premature end of data segment When creating an UIImage with corrupt incomplete JPEG data the console will print out Error Corrupt JPEG data premature end of data segment The incomplete image will be shown.. of data segment When creating an UIImage with corrupt incomplete JPEG data the console will print out Error Corrupt JPEG data premature end of data segment The incomplete image will be shown with grey filling up the incomplete part. I do not..

What's the easiest way to resize/optimize an image size with the iPhone SDK?

http://stackoverflow.com/questions/612131/whats-the-easiest-way-to-resize-optimize-an-image-size-with-the-iphone-sdk

planning on resizing the image to something a bit smaller to save on space performance. Also some of those images are JPEGs and they are not saved as the usual 60 quality setting. How can I resize a picture with the iPhone SDK and how can I change.. usual 60 quality setting. How can I resize a picture with the iPhone SDK and how can I change the quality setting of a JPEG image iphone ios image cocoa touch resize share improve this question A couple of suggestions are provided as answers.. use with the iPhone is PNG because it has optimizations for that format. However if you want to store these images as JPEGs you can take your UIImage and do the following NSData dataForJPEGFile UIImageJPEGRepresentation theImage 0.6 This creates..

iOS download and save image inside app [duplicate]

http://stackoverflow.com/questions/6238139/ios-download-and-save-image-inside-app

NSData and Uploading Images via POST in iOS

http://stackoverflow.com/questions/8042360/nsdata-and-uploading-images-via-post-in-ios

uploading images via POST in iOS. Despite the wealth of information on this topic I cannot manage to correctly upload JPEG data taken from my iPhone Simulator Photo Library. The data once on the server is just a huge string of hexidecimal. Shouldn't.. @ @ r n _params objectForKey param dataUsingEncoding NSUTF8StringEncoding add image data NSData imageData UIImageJPEGRepresentation imageToPost 1.0 if imageData body appendData NSString stringWithFormat @ @ r n boundary dataUsingEncoding..

iPhone - Setting background on UITableViewController

http://stackoverflow.com/questions/898351/iphone-setting-background-on-uitableviewcontroller