I am using Google chart API to get a chart in image form via URL.
The URL I am passing in my 'img' tag is : https://chart.googleapis.com/chart?cht=pc&chco=FFFFFF,FFFFFF,FFFFFF,FFFFFF,74D3EF|EDEDED&chd=t:-1|-1|-1|-1|52,48&chs=122x122&chp=4.7
I am getting the image as I want, just wanted to know if i can get a high resolution image ?
Set the "chs" parameter to the dimensions you want:
https://chart.googleapis.com/chart?cht=pc&chco=FFFFFF,FFFFFF,FFFFFF,FFFFFF,74D3EF|EDEDED&chd=t:-1|-1|-1|-1|52,48&chs=500x500&chp=4.7
The ImageChart API supports images up to 30000 pixels total (eg, 500x600). If you need a higher resolution chart, you will have to switch to another chart API (like the Google Visualization API).
Related
I use Google Cloud Storage for images. Images get uploaded to my Google App Engine based server. To serve the images I use the feature that allows image scaling. Just appending =sXXX to the image scales it to the desired XXX size for the largest side. Pecurliar that omitting =sXXX suffix scales to 512 pixels.
In order to NOT scale, one has to add =s0. This is what I do.
Sometimes, not always, I get this interesting problem. Serving URL uses =s0 suffix to ensure the original image gets download. Here is the example, which works
bread image, original size, =s0 suffix
It should work, this is documented in this Google App Engine article:
Images Python API Overview and also in this article Uploading, Resizing and Serving images with Google Cloud Platform
However for some images it does not work. Example:
This does not work:
http://lh3.googleusercontent.com/Kwj_Fe938vOxsVw9KFILW-MaxoNJlGinxfAHqj4_3bSxhHWPoSLXb5zXGn5k7V4BJgWRlgD1zvULpmjCnFhE1Q=s0
However removing the suffix =s0, shows image all right.
http://lh3.googleusercontent.com/Kwj_Fe938vOxsVw9KFILW-MaxoNJlGinxfAHqj4_3bSxhHWPoSLXb5zXGn5k7V4BJgWRlgD1zvULpmjCnFhE1Q
At least some other sXXX suffixes work
http://lh3.googleusercontent.com/Kwj_Fe938vOxsVw9KFILW-MaxoNJlGinxfAHqj4_3bSxhHWPoSLXb5zXGn5k7V4BJgWRlgD1zvULpmjCnFhE1Q=s250
So far I have not found a pattern. Looking at Google's bug repository for Cloud Storage does not reveal anyting useful.
Anyone has an idea where to look?
i'm planning to build a web app where following feature is used:
Imagine uploading an image,
and the dimensions within the image need to be retrieved
e.g. I would like to know the height and width of the input field.
given the fact I can provide the base image sizes and aspect ratio's.
How would one go about getting the marked dimensions out of the given image?
is there an open API that could do this?
Is this even a possiblity?
https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=apple+icon
Am using the above API to get the set of images for my search keyword.
The API return exact results for my search keyword. But what i want is, to limit the search images size and color.
Is it possible to send image size and image color as a parameter to the API call.
I have searched for the documentation but all in vain.
Thanks in advance.
From Google's API documentation:
Optional URl arguments:
imgsz
imgsz=icon
Restricts the search to images of the specified size, where size can be one of:
imgsz=icon restricts results to small images
imgsz=small|medium|large|xlarge restricts results to medium-sized images
imgsz=xxlarge restricts results to large images
imgsz=huge restricts resykts to extra-large images
And for colour (imgcolor) just above that...
In using Tumblr theme tags, you can use {PortraitURL-16} or {PortraitURL-128} to get a 16x16px or 128x128px (respectively) portrait image URL. Similarly you can use {PhotoURL-500} to get a 500px wide URL to that image in a photo post.
I'm wondering if it is at all possible to do the same thing (specify a dimension value) for custom uploaded images in my Tumblr theme. For example, I use {image:Avatar}, and if someone were to upload a 1280 pixel-wide photo, I'm still going to be display it at 60x60px. Is there any way to specify {image:Avatar-60} so I'm not loading a huge image on every page load?
Afaik, no. Images are processed in three different ways on Tumblr.
Photo / Photoset / Panoramic Post
When creating a new Photo / Photoset post any images added, Tumblr will process, and create multiple copies at various sizes. You can then retrieve a specific size by using the appropriate theme operators:
{PhotoURL-HighRes}
{PhotoURL-500}
{PhotoURL-400}
{PhotoURL-250}
{PhotoURL-100}
{PhotoURL-75sq}
Theme Assets
You can also upload an image whilst customising a theme, via the customisation page. Unlike Photo / Photoset Post, these images are processed and retain their original size and multiple sized versions aren't created.
Post Body / Caption
Finally you can upload an image whilst adding content to the post body / caption. These images are processed and capped at 500px high / wide.
Hope that helps!
When using get_serving_url(user.photoBlobKey) to return an image URL from the GAE Blobstore, the Google Images API returns a JPEG image with quality = 70 and size = 512px as default.
Is there any way to increase the default JPEG quality returned by get_serving_url()?
There's an undocumented URL parameter l, you can add it to the end of the image URL like so: =l100 (or =s640-l70 if you have another param before it) that should modify the output quality of the JPEG. Seems to be =l1 to =l100.
See also: List of all the App Engine images service get_serving_url() URI options
No there is not.
If you think it's a useful feature you can add an item to the issue tracker, from there the team will assess the demand for implementing it.
you can't control the output quality but by requesting
get_serving_url(user.photoBlobKey, size=0)
you will get the original size of the image up to 1600px height and width.
the returned url will be automatically postfixed with =s0 which you could add also before rendering the image in the template for example.