Hello,
I've been developing an iPhone app for the last few months. Recently I wanted to up performance and cache a few of the images that are used in the UI. The images are downloaded randomly from the web by the user so I can't add specific images to the project. I'm also already using NSUserDefaults to save other info within the app.
...
The following piece of code is resizing the image perfectly, but the problem is that it messes up the aspect ratio (resulting in a skewed image). Any pointers?
// Change image resolution (auto-resize to fit)
+ (UIImage *)scaleImage:(UIImage*)image toResolution:(int)resolution {
CGImageRef imgRef = [image CGImage];
CGFloat width ...
Hi!
Content:
I stored the image from the iPhone's camera into a UIImage *storedImage defined in ClassA.
In ClassB (subClass of ClassA) I have a UIImageView *imageView which I proceeded to set
UIImageView.image = storedImage
since ClassB has access to ClassA's objects.
Problem:
Stored image does not show when ClassB's nib runs and...
I've tried some code from each of these questions:
How to make one color transparent on a UIImage?
How to mask a UIImage so that white becomes transparent on iphone?
but have come up unsuccessful, unfortunately working with Core Graphics and images is not my strong suit.
How would I go about accessing a UIImage's raw data and changin...
On a iPhone app, I need to send a jpg by mail with a maximum size of 300Ko (I don't no the maximum size mail.app can have, but it's another problem). To do that, I'm trying to decrease quality until obtain an image under 300Ko.
In order to obtain the good value of the quality (compressionLevel) who give me a jpg under 300Ko, I have made...
Hello !
In my iPhone app, I take a picture with the camera, then I want to resize it to 290*390 pixels. I was using this method to resize the image :
UIImage *newImage = [image _imageScaledToSize:CGSizeMake(290, 390) interpolationQuality:1];
It works perfectly, but it's an undocumented function, so I can't use it anymore with...
hi,
when i am sending image from my iphone app to blackberry mobile configured mail-ID. the alert is i am getting that image not supportable formate. But i used jpeg formate, because all blackberry mobiles support jpeg formate only.
please help me how to overcome this issue. here is the sample code i am using
NSData *myData = UIImag...
I have an app with multiple UIView subclasses that acts as pages for a UIScrollView. UIViews are moved back and forth to provide a seamless experience to the user. Since the content of the views is rather slow to draw, it's rendered on a single shared CGBitmapContext guarded by locks by NSOperation subclasses - executed one at once in an...
I have a project that is coming around the bend this summer that is going to involve, potentially, an extremely high volume of image data for display. We are talking hundreds of 640x480-ish images in a given application session (scaled to a smaller resolution when displayed), and handfuls of very large (1280x1024 or higher) images at a t...
Hi All,
When creating an UIImage file from a .png to be displayed on a button, view/cell background, etc. for a standard Iphone application, should all of them be in powers of 2 for optimization reasons?
...
hi all,
I'm writing an app which uploads a UIImage to my server. This works perfect, as I see the pictures being added. I use the UIImageJPEGRepresentation for the image data and configure an NSMutableRequest. ( setting url, http method, boundary, content types and parameters )
I want to display an UIAlertView when the file is being up...
I have the following path in NSString *path1,
/Users/srikanth/Library/Application Support/iPhone Simulator/User/Applications/9E6E8B22-C946-4442-9209-75BB0E924434/Documents/snook.jpg
How can I show the image snook.jpg.
I need it to show in UITableViewCell for
cell.imageView.image
if path1 has the path. I used the following to...
I just cant find useful information from web.
I have an UIImage which loaded from sqlLite with method imageWithData(NSData*), I just find the height and width of the size both be zero. I wanna get back the original height and width of the image, is it possible? or I do need to store these information separately in sqllite?
...
Hi,
I have a UITable View that displays an image in the left hand side of the table cell, and it works fine in the simulator.
Only problem is, once I ran it on my device no images appear. It's just a blank white space.
Have checked that images are added to resource folder for build (which they are) and that capitals etc. match (which ...
I am noticing a very strange UITableView memory behaviour. I am writing an image application which displays thumbnails in UITableView. I am retrieving images in a separate thread and storing them in an array. UITableView cellRowatIndexpath reads from that array and sets up cells. According to my understanding, since I am creating UIImage...
Hi,
I'm sending mails thanks to the MFMailComposeViewController API, and I manage to add uiimages in attachment, but I'd like to insert my uiimage into html code in my e-mail, any idea of what kind of conversion I should use for my image ?
Thanks.
...
I've been looking everywhere trying to find a solution to this problem. Nothing seems to help.
I've set up this basic test to try to find the cause of why my memory wasn't being freed up:
if (texture != nil)
{
[texture release];
texture = nil;
}
else
{
UIImage* ui = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResourc...
I have an NSString that I would like to draw it's contents to a UIImage but have absolutely NO idea how I would go about doing this. I need to call a method that I give it an NSString and returns a UIImage with the text drawn into it.
Please help!!
...
I'm working on an app that can change the borders or a rectangular UIImage. The borders will vary, but will look like the UIImage was cut out with scissors, or something to that affect.
What is the best way to do this?
My first thought is to prep a bunch of transparent PNGs with the correct border effect I'm looking for, and then someh...
I have a URL for an image (got it from UIImagePickerController) but I no longer have the image in memory (the URL was saved from a previous run of the app). Can I reload the UIImage from the URL again?
I see that UIImage has a imageWithContentsOfFile: but I have a URL. Can I use NSData's dataWithContentsOfURL: to read the URL?
----...