• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: image size problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image size problem


  • Subject: Re: image size problem
  • From: Jens Ayton <email@hidden>
  • Date: Sat, 26 Jul 2008 15:34:29 +0200

On Jul 26, 2008, at 14:09, MAnish Billore wrote:

I creating an image and checking its size.

I am getting image size is 1440x1920 but it is different from the actual
size that is 2560 × 1920.


NSImage *image = [NSImage imageRepWithContentsOfFile:fullPath];

NSSize imgSize=[image size];

NSLog(@" size %fx%f" , imgSize.height,imgSize.width);

This question should be on Cocoa-dev, but: -[NSImage size] returns dimensions in points, not pixels. It is possible that your image has a resolution of 128x72 pixels for some reason. If you need the size in pixels, look for a bitmap rep in the image and use -pixelsWide and - pixelsHigh.



-- Jens Ayton

Today, we celebrate the first glorious anniversary
of the Information Purification Directives.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >image size problem (From: "MAnish Billore" <email@hidden>)

  • Prev by Date: image size problem
  • Next by Date: Re: User Scripts in Xcode 3.1
  • Previous by thread: image size problem
  • Next by thread: Static library linking in the face of system dynamic libraries
  • Index(es):
    • Date
    • Thread