I have a tableview of rows with an imageview on the left with a profile picture. Some pictures are portrait and some are landscape. Since the images are remote I do not have the width/height to calculate and resize/crop using the hack here (http://developer.appcelerator.com/question/125743/a-hack-for-cropping-images)
If I just set the images to the imageview I get whitespace on the sides (if portrait) or on the top/bottom (if landscape) where I want the images to be square.
Are there any recommended solutions that I am unaware of?
Here are my current options
-- Change imageview to view and stretch width and height to 100% (would look pretty crappy).
-- Download remote image to device, convert to blob, get width and height, use crop hack. (takes forever if you have more than a few images).
-- Crop server side (last resort, havent messed with this yet).
Are there any other options or am I missing something? Thanks for your time!
1 Answer
Accepted Answer
How are they added to the server? I have a function somewhere (PHP) that could take an uploaded image and get the height and width. I would then just store that in the database with the url, and do an if/else in my code to set the dimensions
Your Answer
Think you can help? Login to answer this question!