image-quality

proper way to handling images in Android? by using Firebase

让人想犯罪 __ 提交于 2020-03-22 07:02:25
问题 I have 10,000 full sized images so each image is about 4MB. I want to display images in android app by using firebase storage and database and recyclerview . My question is Case 1. Do I have to save reduced sized images in firebase storage? Case 2. Do I just save original big sized images in firebase storage and loading low quality small sized images? I have already implemented the Case 1 with Glide. This is not a problem. What about Case 2? Does it work? 回答1: Case 1. Do I have to save

proper way to handling images in Android? by using Firebase

我的梦境 提交于 2020-03-22 07:00:40
问题 I have 10,000 full sized images so each image is about 4MB. I want to display images in android app by using firebase storage and database and recyclerview . My question is Case 1. Do I have to save reduced sized images in firebase storage? Case 2. Do I just save original big sized images in firebase storage and loading low quality small sized images? I have already implemented the Case 1 with Glide. This is not a problem. What about Case 2? Does it work? 回答1: Case 1. Do I have to save

Improve image quality while using getDrawingCache - android

你说的曾经没有我的故事 提交于 2019-12-19 04:05:07
问题 I am capturing my layout view using getDrawingCache() method and creating image from it. The code works fine and image gets generated, but the problem here is, the generated image quality is very low. I want the resolution of generated image to be high so that whenever i set it to ImageView it don't get stretched. Here is the code which I am using : RelativeLayout layout = (RelativeLayout) findViewById(R.id.layout); layout.setDrawingCacheEnabled(true); Bitmap bmp = layout.getDrawingCache();

canvas drawImage quality

给你一囗甜甜゛ 提交于 2019-12-18 18:53:35
问题 Here is a .png image (on the right), and the canvas element which I drew the image on (on the left). Can you notice the quality difference? Canvas renders the image with noticeable quality loss. What can we do? I observed this result on Chrome and IE9. Others will probably do the same thing. How I render the image is quite usual: In the script I create a new Image() object, after it's loaded I call context.drawImage(myimage, x, y); EDIT: This is the initial image i observed on the canvas: And

canvas drawImage quality

此生再无相见时 提交于 2019-12-18 18:53:15
问题 Here is a .png image (on the right), and the canvas element which I drew the image on (on the left). Can you notice the quality difference? Canvas renders the image with noticeable quality loss. What can we do? I observed this result on Chrome and IE9. Others will probably do the same thing. How I render the image is quite usual: In the script I create a new Image() object, after it's loaded I call context.drawImage(myimage, x, y); EDIT: This is the initial image i observed on the canvas: And

Loading images by Glide spoil image quality

强颜欢笑 提交于 2019-12-12 05:58:55
问题 I build simple gallery. I load my photos using Glide. It looks like on images loaded by glide is some kind of streak (pixels seems to be visible). I tried to load photo with changed Format RGB_565/ARGB_8888 and I used .dontTransform() but still it looks worse than original photo. Code I use to load : ImageView photoDetails; photoDetails = (ImageView)findViewById(R.id.imageDetails); Glide.with(this) .load(pictureFile) //path to picture .asBitmap() .format(DecodeFormat.PREFER_ARGB_8888)

Android cropped image quality issue

狂风中的少年 提交于 2019-12-11 14:48:32
问题 I am trying to save an image as cropped from android and then show it in my app. I am using the code below, but when I try to view the image in my app the image quality is not good as in the attached image. Am doing anything wrong? Any help would be great. My code is: dipToPixel = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1, getResources().getDisplayMetrics()); public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,

Reducing JPEG image quality without saving

妖精的绣舞 提交于 2019-12-06 14:41:09
问题 I am trying to programatically reduce the quality of an image in the fastest way possible. Right now, I am able to read image from byte[] , then as a MemoryStream read it to Bitmap and via Drawing.Imaging.Encoder.Quality change its quality when saving to desired 20L . I would like to know if there is a way to do this without saving the whole image. Is there way to just change the bitmap bmp1 , or create a new bitmap that would have the image quality reduced? byte[] imageBytes =

Reducing JPEG image quality without saving

允我心安 提交于 2019-12-04 19:32:17
I am trying to programatically reduce the quality of an image in the fastest way possible. Right now, I am able to read image from byte[] , then as a MemoryStream read it to Bitmap and via Drawing.Imaging.Encoder.Quality change its quality when saving to desired 20L . I would like to know if there is a way to do this without saving the whole image. Is there way to just change the bitmap bmp1 , or create a new bitmap that would have the image quality reduced? byte[] imageBytes = convertImageToByteArray(bmpScreenshot); MemoryStream mem = new MemoryStream(imageBytes); using (Bitmap bmp1 = (Bitmap

canvas drawImage quality

感情迁移 提交于 2019-11-30 17:23:12
Here is a .png image (on the right), and the canvas element which I drew the image on (on the left). Can you notice the quality difference? Canvas renders the image with noticeable quality loss. What can we do? I observed this result on Chrome and IE9. Others will probably do the same thing. How I render the image is quite usual: In the script I create a new Image() object, after it's loaded I call context.drawImage(myimage, x, y); EDIT: This is the initial image i observed on the canvas: And here's what the canvas renders after I wrote: context.drawImage(myimage,parseInt(x),parseInt(y)); What