Texture size of Social.localUser.image - unity3d

Im having a hard time figuring out the actual size of the texture2D that gets returned from Social.localUser.image. When I try to read its width and height it comes back with a 6x4 which doesn't sound right at all. Possibly I'm doing it wrong, or there is a doc that says the size it returns?

if anyone else is looking for the solution its 512x512.

From The Link:
https://github.com/playgameservices/play-games-plugin-for-unity/issues/474
Here someone checked the URL of the Texture and He got 96 pixels.
I also checked, it's not 512 x 512.
It is 96 pixels.

Related

Confusion over #2x and Image Resolution

I have some image I got from the web. Let's say that the max size I can make it without pix elating is 500 x 500. So with that said, should I make the #2x version of it, simply the 500 x 500 version, and regular version (ie for non retina) 250 x 250? Just a little confused about sizing the image correctly for the right screen resolution and any help would be appreciated.
Yes what you said is correct.
Keep in mind though that once you put it on the device the #2x will display as 250x250 pts on a retina screen.
If the #2x version is 500 x 500 then it will be treated at load time as a 250 x 250 double-resolution image (scale = 2).

iOS - points, pixels and printing

I am creating a UIImage that I want to print using iOS. The printing type will be
printInfo.outputType = UIPrintInfoOutputGeneral;
or in other words, using regular paper.
As far as I read, iOS will print at 72dpi. So, if I want to print a UIImage with a 2x3 inche size on paper I need to create this image with 144 x 216 points, but how much is it in pixels for that UIImage? or in other words, which size should the image has?
thanks
It looks to me that the 72dpi is actually saying 72 pixels. so your image size of 144 x 216 is actually the size you would want to print. The only reason the UIImageView is measured in points rather than pixels is because of the different screen resolutions. The original iPhone has the same size screen as the 4s, but the screen of the 4s has a LOT more pixels in it. Apple used points so that it is easier to program for all of the devices. Check out this link: http://www.scantips.com/basics1a.html i just read through it and i hope it will answer your question. I apologize if i confused you even more, I'm just trying to help! :)

iOS: How to create and draw into (and save) an image larger than the screen?

We're creating an iOS photo app. In doing this, we have to create dynamically sized images up to about 2500x1600px. Once this image has been created, we want to draw smaller images on top of the big one reasonably quickly.
The problem as we can see it is that it's impossible to get a context larger than the screen resolution. The call does not crash, but it returns a nil-context. How can such a seemingly simple task be achieved?
Secondly, once this context is created, what is the fastest way to draw a small image at a given position on top of the big one?
Edit:
We found the solution. CGBitmapContextCreate returns nil because the width and height parameters were set as floats, not ints. Sometimes the solution is right there in front of you, and you're too blind to see it. Hopefully this answer can help other people that somehow have the same problem.
Make sure you specify integer widths and heights as the arguments to CGBitmapContextCreate, otherwise it returns nil. Otherwise, the size of the context should not matter as long as you can malloc enough memory for it.
It should be possible to get a context for almost any bitmap for which you can allocate/malloc enough memory, in your case multiples of 2500x1600x4 bytes of ARGB pixels.
You might also want to look into using a CATiledLayer, where you would only have to draw into the tiles covered by the smaller image. You may have to tile to support older devices which are limited by the max tile size that will fit into the GPUs texture cache.

Image sizing issues (not fitting proportionally)

I created a 8.5x11.0 inches image # a 300dpi setting in photoshop.
When i go to use this as a background image in report designer the image looks hugeee.
It's not fitting within the 8.5x11.0 page.
Is there a way to resize this image correctly so that it will fit correctly within a 8.5x11.0 letter size page?
Thanks in advance,
with the information you gave, i believe your problem is problably in the group Size/dpi
You saved an image of size 8,5 x 11 inches # 300 Dpi (dots per inch) that calculates to aproximately an image of 2550 x 3300 pixels.
Now if your "report designer" software looks only at the size in pixels and assumes a dpi value diferent then the one you used, say for example 72 dpi, your 2550 x 3300 pixels image would actually be something like 45,8 x 35.4 inches.
So, my advice is, find out what are the characteristics your solftware is especting, aparently it is not 300dpi.
If you canĀ“t find the information, try commonly used dpis like 72dpi or 150dpi.

pixel value in UIImageView's image

I'm trying to find the value of an pixel in the image displayed in an UIImageView.
getting the pixel on the display is (relatively) simple. But when the image displayed is scaled (say the orgig. image is 1200*1600) it's much more complicated because of the scaling ..
Any good advice ?
If you're trying to get the pixel value from the original image, this question's accepted answer shows a way to get pixel values from an UIImage.
Edit:
Scaling means a loss of information, so there won't be a one-to-one mapping. One pixel on your scaled-down image corresponds to a patch of pixels in your original image, and the best that you can hope for is a lossy interval mapping from [0..scaledX] to [0..originalX] and from [0..scaledY] to [0..originalY]. An explanation on how to do such a mapping can be found in the answer to this question.