I want to read a image and re size it using App Engine java.
i am not able to find how to read image from a location and save it in app engine.
can any one help????
You can store uploaded image to blobstore. Read following document to know how to use blobstore.
https://developers.google.com/appengine/docs/java/blobstore/overview
Then you can use image service to scale image:
https://developers.google.com/appengine/docs/java/images/overview
Related
How do you take a video that is in Google Cloud Storage and generate a jpeg image from one of its frames? Basically making a thumbnail for the video and saving that also to Google Cloud Storage. I would like to do this with Java server-side.
I have downloaded an image from a URL using ImageIO.write, so now I am wondering if there was a possibility of somehow caching that image. Is there a possibility to compare the downloaded image with the URL it's downloaded from to know that the image is from that URL? I need this because if I download an image and than later call that same URL for downloading, my app can recognize that it already has the image downloaded, so it doesn't download it again.
You should try to see if you can integrate the code to upload the picture to google and search by image. Or, you can also save the url of the image with an array while storing the image if you have multiple images you want to download at once.
I have uploading of pictures in an appengine application. Pictures was saved in blobstore. It uses the html input file.
In addition to that, I want to allow users to save pictures from the internet to the blobstore. If the user have url of a valid picture, I want the picture to be save in blobstore. Is it possible? How to implement this functionality?
e.g. The user will just input url ex. http://domain.com/picture001.jpg then image will be stored in blobstore. Not just the url the picture itself.
Thanks
Use URLFetch to retrieve the image bytes and then use the Files API to write the bytes you fetched to the blobstore.
I'm able to
-Upload an image to the blobstore
-Transform this image (in my case rescale it)
But I don't seem to be able to find out how I can store the transformed image back to Blobstore.
Any ideas?
BR,
As far as I know, this is currently only an experimental feature. You can create a "file" using createNewBlobFile.
Get more information here: Writing Files to the Blobstore (Experimental).
I have image URLs like http://example.com/someimage.png - how do I fetch that image and save it with Blob? Thanks.
Here's example code from the documentation showing how to write a file to the blobstore. You'll have to use a stream instead of a writer, since a PNG image is binary, and you'll have to set the appropriate content type, but it should show you the way.
And here's the UrlFetch documentation, explaining how to get some available resource on the web, using HTTP.