Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7702663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:16:41+00:00 2026-05-31T23:16:41+00:00

In iOS to save an UIImage as JPEG, I use UIImageJPEGRepresentation , however it

  • 0

In iOS to save an UIImage as JPEG, I use UIImageJPEGRepresentation, however it doesn’t take options other than compression ratio. I wish to save the UIImage into progressive JPEG format, is there a easy way to do so?

Looks like in OS X there is an NSImageProgressive option to save NSImage to progressive format.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:16:43+00:00Added an answer on May 31, 2026 at 11:16 pm

    I think you can do it using the ImageIO framework, like this:

    #import <UIKit/UIKit.h>
    #import <ImageIO/ImageIO.h>
    #import <MobileCoreServices/MobileCoreServices.h>
    #import "AppDelegate.h"
    
    int main(int argc, char *argv[])
    {
        @autoreleasepool {
            UIImage *sourceImage = [UIImage imageNamed:@"test.jpg"];
    
            CFURLRef url = CFURLCreateWithString(NULL, CFSTR("file:///tmp/progressive.jpg"), NULL);
            CGImageDestinationRef destination = CGImageDestinationCreateWithURL(url, kUTTypeJPEG, 1, NULL);
            CFRelease(url);
    
            NSDictionary *jfifProperties = [NSDictionary dictionaryWithObjectsAndKeys:
                (__bridge id)kCFBooleanTrue, kCGImagePropertyJFIFIsProgressive,
                nil];
    
            NSDictionary *properties = [NSDictionary dictionaryWithObjectsAndKeys:
                [NSNumber numberWithFloat:.6], kCGImageDestinationLossyCompressionQuality,
                jfifProperties, kCGImagePropertyJFIFDictionary,
                nil];
    
            CGImageDestinationAddImage(destination, sourceImage.CGImage, (__bridge CFDictionaryRef)properties);
            CGImageDestinationFinalize(destination);
            CFRelease(destination);
    
            return 0;
        }
    }
    

    Preview.app says the output file is progressive, and ImageMagick’s identify command says it has “Interlace: JPEG”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I create an app specific file type for iOS and then save
I'm considering starting iOS development as a hobby and would like to save some
My IOS application program have tableview in navigation controller secondview. I want to save
I am new to iOS development. How to save data (say user information) over
I would like to develop an iOS application that send files between other devices
iOS beginner here. I'm using the following code to save my facebook accessToken and
I'm following iOS Development Guide: Unit Testing Applications . However, when I attempt to
I want to use the libjpeg ( http://www.ijg.org/ ) library in an iPhone iOS
I want to save contact directly to an iOS device's Address Book programmatically. How
I'm a newbie iOS developer. I wrote a small application that save an NSMutableArray

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.