Which class can be used for loading an image for editing purposes so that i can add a text over it and save it again as PNG/ JPEG to storage
Load the image the file as an Image then call Image.toByteData
Edit the byte array
then reimage it to decodeImageFromPixels issue 11648
For storage, it is kinda in flux since you have a few choices like sqlite or file directory
https://github.com/flutter/flutter/issues/10495
Flutter save a network image to local directory
I just want to say, image resizing is quite slow in flutter.
https://github.com/brendan-duncan/image/issues/55
https://github.com/flutter/flutter/issues/26194
https://github.com/flutter/flutter/issues/21571#issuecomment-452042242
Flutter. High GPU load with list of high resolution images
Related
When uploading an image in Prestashop, my image is resized accordingly to settings. Can I remove the resize treatment and use native uploaded images in my website?
Images are resized in different size needed for different uses in Prestashop, so disabled fully this feature is not an good idea.
but to get the original image, you need to change path image in your file.tpl
https://example.com/img/p/{$id_product}/{$name_product}.jpg
I've noticed that many website change all their user-uploaded images to .jpg or .png format.
I am wondering what are the pros and cons of converting images to the same format.
Possible points of consideration are:
Security (I heard it is possible to put malicious code in images of certain filetypes)
Storage
Image quality
Scalability
Typically, after a user uploads a photo to a web application, some processing will be done to the image. For example, if a user uploads an avatar image, it will be cropped so that it is square, and resized so that all avatar images are the same size. Sometimes, we may want multiple resolutions of the same image for different display purposes (avatar icon vs. profile page). ImageMagick is often the tool of choice for performing image processing on the server.
I am trying to save the content of an ImageView into a file and save it as an image. The simple code snippet which I am using is:
writeImageToFile(imageView.image);
The function writeImageToFile, saves the blob in a file which contains the image displayed in the image view. All good and fine till here.
Now the point noticed in here is that, I have defined the ImageView with the width and height as 150dip. After saving the image into a file, for iPhone 5, we find that the image resolution is 300x300, and for iPhone 6 Plus it is 450x450. The image resolution varies with the screen density, which I can understand.
But my query is that is there any way to always keep the resolution fixed to 150x150 pixels. Am not sure if this is possible out of the box with Appcelerator or do we need to use external modules.
Note: This is also applicable for Android too.
You can use the Blob functions to check the image size, then decide if you need to resize. You can use imageAsResized (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsResized) to make a 150x150 image.
I'm wondering if anyone knows a good strategy for solving this problem:
I'm creating a social networking site using Laravel 4. Users can upload pictures to their own gallery. These pictures can be any shape and size but the gallery on their profile will only display a cropped and resized thumbnail of the image (200px x 200px), which you can click on to view the full image.
Im using the Laravel plugin Intervention right now, which saves the original image, then resizes and crops that image and saves it again ( so now I have 2 copies). I then display the cropped/resized image as the thumbnail that links to the full size original image. However, I find that making copies of every image will be a tedious waste of space on my server since there could be thousands of images uploaded to the site.
Is there a way to grab the original image, resize and crop it on the fly and display it only when the user loads the page without having to save the thumbnail to the server? or am I stuck with having to make a cropped copy for every image?
A great example that shows what I'm looking to achieve is the way Facebook crops pictures into squares in a users picture gallery or how they are cropped and resized on the newsfeed when a user uploads multiple images to a status.
Any advice is greatly appreciated!
Have you seen League/Glide yet? It's basically a wrapper for Intervention/Image and Intervention/ImageCache. Glide's Laravel setup video gets you set up in two minutes (pay attention to the second example).
Yes Intervention let's you manipulate and display on the fly too.
Here's a simple example (obviously you would actually do it with a controller etc)
Route::get('img/profile/picture.jpg', function(){
$img = Image::make('path/to/profile/picture.jpg');
// resize, crop, whatever
return $img->response();
});
And then you just set the right URI to this route as src of your image.
Intervention Docs
Keep in mind that this will use more server resources and make the image response take longer
I have created website where users can upload image with any size.
I have served images with get_serving_url function.
I have added to end of image modifiers to resize image to 200px size.
http://127.0.0.1:8080/_ah/img/dtrh0i6I_V5JGulg2_LKZw===s200
I have uploaded image 1000x800 - and all right - I have image with size 200x160
If I have uploaded image 100x50 - in result I have resized image with size 200x100. But this is not a good. I need to show original small image, if image size lower that 200px.
How to do this on Google App Engine + Python with get_serving_url?
What you need can't be done automatically using get_serving_url.
I think the easiest way to implement that would be saving the image along with a needs_resize property and calling get_serving_url without size parameter if that is not the case (which serves the original image).