android-image

Reduce Image Size Using Compression Without changing Dimension

孤人 提交于 2020-01-03 05:42:12
问题 How to reduce Image Size without changing image dimensions(Height and width should be same).In android How can i do this?.I want to reduce the quality of image.I want to send it over the network.So size should be smaller.I need a functionality similar to https://play.google.com/store/apps/details?id=com.shoozhoo.imageresizer&hl=en 回答1: Note the application linked reduce the size of the image by cropping it. If you want to reduce the stored bytes of an image you need to compress it using a

Allow user to select background from personalize screen

江枫思渺然 提交于 2020-01-03 04:50:08
问题 In my widget, I want the user to be able to set the background of the main page by selecting a picture from their gallery and then that image would also show up in a imageView on the personalize screen (so they know what the image will look like). So far, I have the imageView set up on the personalize page: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"

Picasso New Version 2.5.2: Not Working with Transformation

ぐ巨炮叔叔 提交于 2020-01-02 18:09:29
问题 Hello Picasso+Android Users, I have used following version of Picasso and its working with following Transformation snippet: compile 'com.squareup.picasso:picasso:2.3.2' and created following Transformation for Image Transformation : public class ImageTransformation implements Transformation { int maxWidth; int maxHeight; public ImageTransformation(ImageView imageView) { this.maxWidth = imageView.getWidth(); this.maxHeight = imageView.getHeight(); } @Override public Bitmap transform(Bitmap

Using the system image for “no picture” contacts on Android

筅森魡賤 提交于 2020-01-02 10:59:41
问题 I found this question which is the same problem that I would like to address. Reading his question and the accepted answer though, it sound like his approach was to pull the actual image file from the resources, embed it in his app and use it as a local resource. What I'd prefer to be able to do is in the source property for my image, use an ID which would allow me to pull that image from the local system, so that whether my app is running on ICS, HC, GB or Froyo, or if the manufacturer of

Using the system image for “no picture” contacts on Android

最后都变了- 提交于 2020-01-02 10:59:33
问题 I found this question which is the same problem that I would like to address. Reading his question and the accepted answer though, it sound like his approach was to pull the actual image file from the resources, embed it in his app and use it as a local resource. What I'd prefer to be able to do is in the source property for my image, use an ID which would allow me to pull that image from the local system, so that whether my app is running on ICS, HC, GB or Froyo, or if the manufacturer of

Null point exception in IMageSwitcher.setImageResource()

♀尐吖头ヾ 提交于 2020-01-02 07:57:47
问题 I am doing an animation to show many images in ImageSwitcher but am stuck in setting images to ImageSwitcher . This is the imageswitcher in my xml. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal"

Putting some indicator around the image in image move/resize/rotate operations

妖精的绣舞 提交于 2019-12-31 08:12:13
问题 I would like to Scale, Move, Resize Image. I would like to surround the image with Indicators which guide user what operation these indicators perform i.e. Moving, Rotating, Scaling. I've tried Scaling - but it only crops down. No chance to increase length and height of image. Rotate - achieved but via inserting manual degrees. That's not a good option in here. Moving - as I'm achieving drag on Api < 11. So little bit of difficult. Still no hope in here. Is there any library which can do me

Fresco image loading callback

有些话、适合烂在心里 提交于 2019-12-31 01:57:21
问题 I have just migrated to the Fresco library for loading images in my app. I need to listen to Image Loading Events, of course I read this article in documentation Listening to download events This is exactly what I need, but.... There few things that I don't like. My goal is to hide View if it fails to download it from the net. I cannot reference SimpleDraweeView from controller, even on callback method. I need to hide View , but it seems that I cannot get reference to it. Each time I need to

How to upload an image to Firebase storage?

混江龙づ霸主 提交于 2019-12-30 06:01:11
问题 I'm trying to upload a simple byte array into Firebase storage, but my onFailureListener keeps getting called and logging back to me saying that the upload failed. I'm hoping you guys can tell me whats wrong with my code. At the top I got //Firebase private Firebase mRef; private StorageReference storageRef; Then in onStart() @Override protected void onStart() { super.onStart(); googleApiClient.connect(); //Firebase mRef = new Firebase("link to firebase account"); FirebaseStorage storage =

How to use images in Android SQLite that are larger than the limitations of a CursorWindow?

﹥>﹥吖頭↗ 提交于 2019-12-28 02:19:04
问题 As per the question. Say I have an Image that is approx 3.5 MB in size, which could be saved as a blob, but couldn't be retrieved due to the 2Mb limitation of a CursorWindow? Note The question has been asked purely to show, contrary to responses saying that it cannot be done, that it can be done (albeit NOT RECOMMENDED ), as this is a It’s OK to Ask and Answer Your Own Questions. 回答1: Note This is not recommended as it would still likely be quite inefficient in comparison to storing the path