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 7494867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:49:25+00:00 2026-05-29T17:49:25+00:00

When sharing an image in an iPhone, we are given an opportunity to pick

  • 0

When sharing an image in an iPhone, we are given an opportunity to pick different sizes of an image – Small, Medium, Large, Original. And an opportunity of see the size in KB/MB along with each classification.

  1. Where does apple expose this code for users to leverage? I couldn’t spot it in my searches in iOS docs.
  2. What are some tested & tried frameworks/methods available on GitHub or elsewhere that can emulate this behavior?

EDITED:
I evaluated the solution posted by Brad Larson:
UIImage: Resize, then Crop
By confirming a decrease in size via the size measuring solution given below.
Together they are a good fit.

  • 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-29T17:49:26+00:00Added an answer on May 29, 2026 at 5:49 pm
    1. Where does apple expose this code for users to leverage? I couldn’t spot it in my searches in iOS docs.

    iOS is not open-source project. Apple releases only sample code which is used like tutorial sample project.


    Here’s an article regarding calcutation of image file size.

    This is very simple, though. Here’s the code:

    UIImage *image = [UIImage imageNamed:@"your_big_image.png"];
    
    size_t depth = CGImageGetBitsPerPixel(image.CGImage);
    size_t width = CGImageGetWidth(image.CGImage);
    size_t height = CGImageGetHeight(image.CGImage);
    
    double bytes = ((double)width * (double)height * (double)depth) / 8.0;
    

    Now you have your image size in bytes.

    To convert it to kB divide it by 1024. If you want to get MB, divide by 1048576 (1024×1024).

    double kb = bytes / 1024.0f;
    double mb = bytes / 1048576.0f
    

    Then you can display it to your user by formatting your message as following:

    NSString *msg = [NSString stringWithFormat:@"Original %dx%d (%.2f MB)", (int)width,(int)height, (float)mb];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have have an image(tattoo) sharing site with 3 different ways of indexing
I've been sharing image lists across multiple forms in Delphi for years now. I
I am building an advanced image sharing web application. As you may expect, users
I'm building a image sharing site and would like to know the pros and
Im working on an image sharing site and want to implement tagging for the
How can I change the name and the image that appear when sharing blog
can you help me by sharing your knowledge on how to draw a small
I am developing iphone app which shares photos on social networks.For photo sharing I
I'm currently using SQLite3 with a simple post and image sharing app, similar to
I'm sharing an image from my application by starting Intent.ACTION_SEND with image msg.setType(image/png) using

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.