Advertisement
pusatdata

URL Image Picasa

Mar 22nd, 2016
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. How to get an image of a specific size
  2. These directions are for images uploaded to Picasa Web Albums. You can retrieve the image in a chosen size by modifying a part of the URL.
  3.  
  4. There are different parameters you can use to get different effects, but none are documented by Google, so the behavior could change or disappear at any moment.
  5.  
  6. You can always change the number used in the parameters explained below with any other number to get a different size. If you request a size larger than the "physical" size uploaded to Picasa Web Albums, the physical size of the image will be returned (example, if you request the image in 200 pixels wide, and you ask for 300 pixels, only an image of 200 pixels will be returned).
  7.  
  8. These are the "known" parameters by the Picasa TCs... If you know of any other, please post your finding on the picasa support forum:
  9. "s400": this gets the image with width or height (whichever is larger in the original image) resampled to 400 pixels. The other dimension will be 400 as well in case of a square images, otherwise it will be proportionally smaller.
  10. Eg.:
  11. landscape image (original: 2048 x 854 pixels, result: 400 x 167 pixels):
  12. https://lh5.googleusercontent.com/-vvnmwm_aQT8/U5XhV6_wbUI/AAAAAAABPgg/cQrJkShnL5w/s400/Onweer_stitch.jpg
  13. portrait image (original : 1196 x 2048 pixels, result 234 x 400 pixels):
  14. https://lh6.googleusercontent.com/-Du5sjWWmXcU/TplK6DYjlnI/AAAAAAABHbY/5Di2rH_nEtY/s400/P1050401_stitch.jpg
  15. "w400": this gets the image resampled so the width is always 400 pixels.
  16. Eg.:
  17. landscape image (original: 2048 x 854 pixels, result: 400 x 167 pixels):
  18. https://lh5.googleusercontent.com/-vvnmwm_aQT8/U5XhV6_wbUI/AAAAAAABPgg/cQrJkShnL5w/w400/Onweer_stitch.jpg
  19. portrait image (original : 1196 x 2048 pixels, result 400 x 685 pixels):
  20. https://lh6.googleusercontent.com/-Du5sjWWmXcU/TplK6DYjlnI/AAAAAAABHbY/5Di2rH_nEtY/w400/P1050401_stitch.jpg
  21. "h400": this gets the image resampled so the height is always 400 pixels.
  22. Eg.:
  23. landscape image (original: 2048 x 854 pixels, result: 960 x 400 pixels):
  24. https://lh5.googleusercontent.com/-vvnmwm_aQT8/U5XhV6_wbUI/AAAAAAABPgg/cQrJkShnL5w/h400/Onweer_stitch.jpg
  25. portrait image (original : 1196 x 2048 pixels, result 234 x 400 pixels):
  26. https://lh6.googleusercontent.com/-Du5sjWWmXcU/TplK6DYjlnI/AAAAAAABHbY/5Di2rH_nEtY/h400/P1050401_stitch.jpg
  27. "w800-h400": this gets the image resampled in such a way so the width will be maximum 800 pixels and the height will be maximum 400 pixels. So one of the dimensions will be the exact size specified, the other dimension will be the size specified or smaller.
  28. Eg.:
  29. landscape image (original: 2048 x 854 pixels, result: 800 x 334 pixels):
  30. https://lh5.googleusercontent.com/-vvnmwm_aQT8/U5XhV6_wbUI/AAAAAAABPgg/cQrJkShnL5w/w800-h400/Onweer_stitch.jpg
  31. portrait image (original : 1196 x 2048 pixels, result 234 x 400 pixels):
  32. https://lh6.googleusercontent.com/-Du5sjWWmXcU/TplK6DYjlnI/AAAAAAABHbY/5Di2rH_nEtY/w800-h400/P1050401_stitch.jpg
  33. "...-c", eg: "w800-h400-c": this gets the image so it is exactly this size. The source image is first resampled so the image is fitting for the limiting dimension, then the other dimension is cropped so the image is the exact size asked. When cropping, it is just the centre of the picture that is kept.
  34. Eg.:
  35. landscape image (original: 2048 x 854 pixels, result: 800 x 400 pixels):
  36. https://lh5.googleusercontent.com/-vvnmwm_aQT8/U5XhV6_wbUI/AAAAAAABPgg/cQrJkShnL5w/w800-h400-c/Onweer_stitch.jpg
  37. portrait image (original : 1196 x 2048 pixels, result 800 x 400 pixels):
  38. https://lh6.googleusercontent.com/-Du5sjWWmXcU/TplK6DYjlnI/AAAAAAABHbY/5Di2rH_nEtY/w800-h400-c/P1050401_stitch.jpg
  39. "...-p", eg: "w800-h400-p": this gets the image so it is exactly this size. The source image is first resampled so the image is fitting for the limiting dimension, then the other dimension is cropped so the image is the exact size asked. When cropping, some algorythm searches the most interesting part of the image, so the result of the cropping doesn't always keep the center of the picture.
  40. Eg.:
  41. landscape image (original: 2048 x 854 pixels, result: 800 x 400 pixels):
  42. https://lh5.googleusercontent.com/-vvnmwm_aQT8/U5XhV6_wbUI/AAAAAAABPgg/cQrJkShnL5w/w800-h400-c/Onweer_stitch.jpg
  43. portrait image (original : 1196 x 2048 pixels, result 800 x 400 pixels):
  44. https://lh6.googleusercontent.com/-Du5sjWWmXcU/TplK6DYjlnI/AAAAAAABHbY/5Di2rH_nEtY/w800-h400-c/P1050401_stitch.jpg
  45. "s0", "w0", "h0", "w0-h0": this will get the image in it's original size, without any resampling nor cropping.
  46. Eg.:
  47. landscape image (original: 2048 x 854 pixels, result: 800 x 400 pixels):
  48. https://lh5.googleusercontent.com/-vvnmwm_aQT8/U5XhV6_wbUI/AAAAAAABPgg/cQrJkShnL5w/s0/Onweer_stitch.jpg
  49. portrait image (original : 1196 x 2048 pixels, result 800 x 400 pixels):
  50. https://lh6.googleusercontent.com/-Du5sjWWmXcU/TplK6DYjlnI/AAAAAAABHbY/5Di2rH_nEtY/s0/P1050401_stitch.jpg
  51. "...-no", eg: "w800-h400-no": this gives a slightly bigger image as a result (for the image I looked into), haven't found out yet what the exact impact is.
  52.  
  53. Shortened URL to this page: http://goo.gl/2SWTzR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement