Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
I don't know if this is possible with iOS or even in general, but was looking to see if anyone knew.
There is a repository of images that I am using that I have no control over the resolution of the images in them. They are, however, a known resolution that does not change. For example, 1000x1000 pixels.
I'd like to use these in one of my apps, but only need images that are 100x100 pixels. Downloading 1000x1000 pixel images would be WAY too much bandwidth as they are used quite often in tables.
The images are PNG files. Is it possible to run a modified version of the dataWithContentsOfURL or possibly an asynchronous NSURLConnection that only grabs a portion of the data in the image? In this case, only grabbing the data for every 10th pixel?
Looking at the methods for getting pixel color from images or reducing image size would make you think that this MAY be possible.
Anyone done this before? I've tried doing google searches but having a hard time coming up with a search term for what I'd like to do.
I don't know if this is possible with iOS or even in general, but was looking to see if anyone knew.
There is a repository of images that I am using that I have no control over the resolution of the images in them. They are, however, a known resolution that does not change. For example, 1000x1000 pixels.
I'd like to use these in one of my apps, but only need images that are 100x100 pixels. Downloading 1000x1000 pixel images would be WAY too much bandwidth as they are used quite often in tables.
The images are PNG files. Is it possible to run a modified version of the dataWithContentsOfURL or possibly an asynchronous NSURLConnection that only grabs a portion of the data in the image? In this case, only grabbing the data for every 10th pixel?
Looking at the methods for getting pixel color from images or reducing image size would make you think that this MAY be possible.
Anyone done this before? I've tried doing google searches but having a hard time coming up with a search term for what I'd like to do.
Regards, James
Is it possible to run a modified version of the dataWithContentsOfURL or possibly an asynchronous NSURLConnection that only grabs a portion of the data in the image? In this case, only grabbing the data for every 10th pixel?
In a word, no.
The best you're going to be able to do is to download the full-sized image, then resample it at a smaller size. That's fairly easy.
Regards,
Duncan C WareTo
Animated GIF created with Face Dancer, available for free in the app store.
The best you're going to be able to do is to download the full-sized image, then resample it at a smaller size. That's fairly easy.
Thanks Duncan. That's what I had assumed as I hadn't seen it done before. Resampling is definitely a piece of cake so no problem there.
I'd love to know if anyone has a link to a resource that would explain WHY this isn't really possible. I imagine it could be for several reasons:
1. PNGs not able to strip into pieces of PNGs without losing possible format data?
2. Connection nature in not allowing skipping bits of data in stream. (Although streaming audio seems to do this essentially by allowing jumping to any portion of a track).
Replies
The best you're going to be able to do is to download the full-sized image, then resample it at a smaller size. That's fairly easy.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI'd love to know if anyone has a link to a resource that would explain WHY this isn't really possible. I imagine it could be for several reasons:
1. PNGs not able to strip into pieces of PNGs without losing possible format data?
2. Connection nature in not allowing skipping bits of data in stream. (Although streaming audio seems to do this essentially by allowing jumping to any portion of a track).
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome