I have extended a cropview library CropIwa and it is very good. It satisfies me well. The problem is when saving the crop image it asks about the destinationURI and I dont know how to get it.
My plan is to save it to database or if best firebase storage.
SOrry for the grammar.
It would appear that this Uri indicates where the cropped image should be written to after cropping.
For example, you could create a File object pointing to where you want the image to be saved, and then use Uri.fromFile() to get a Uri pointing to that location. Pass that Uri to the CropIwaSaveConfig.Builder constructor.
Related
I make a screenshot of part of screen, convert it into bitmap and wonder how to put it into clipboard. Find the only text examples, so is it possible to put bitmap or something like that right into clipboard avoiding saving screenshot into file and using URI for ClipData?
Each Item instance can be one of three main classes of data: a simple CharSequence of text, a single Intent object, or a Uri. See Item for more details.
https://developer.android.com/reference/android/content/ClipData
Official doc says, there are only three types you can use with ClipData. So, it seems, you cannot use bitmap directly, but you can save it and send its URI to ClipManager as ClipData.
I'm new to android and I'm stuck. I want to create an app (Picture Quiz) in which an image shown up with specific name under it in a textview. User will choose one answer and new image and its name comes, and they continously keep on coming until the user chooses the wrong answer. Then it will start again but this time images and their names should be shuffled.
I don't know where to put all these images (150 of them) either in drawables or somewhere else. How can i get and show both image and name using one ID and how can i shuffle them. Will i needed sqlite database?
Note: Sorry for lack of data and presentation. I didn't started it yet because i did not found any solutions yet.
one of the best way is
1.
store all images in drawable
2.
Make POJO file which contains all three id, path (R.drawable.image1), name
3.
use Arraylist to insert all data
4.
use Random to shuffle
sure, it's working, will get back further for more.
I want to change the image of the button (which I know how to do it) . Is there any other way of adding the image without giving the location of the image because if the location of the application changes it will not display the image. So I want to know if there is any other way possible?
Edit:
jButton1.setIcon(new ImageIcon("Address of the image"));
I don't want to add this address since it might change the location.
if (status.equals("update"))
jButton1.setIcon(new ImageIcon("C:/Users/laptop/Documents/NetbeansProjects/Physics/src/update.png"));
This is the code for changing the image update.png from add.png if status is update. I don't want to write it's address since if the location of the jar file changed it won't display image. The project will run offline, so no need for online suggestion
simply add the image file in the project directory and provide only the name and format of the file
i.e in case of your example: if (status.equals("update"))
jButton1.setIcon(new ImageIcon("update.png"));
I want to REMOVE the Thumbnail image after take a picture. I used the camera intent to launch the camera, passing the file Uri.
I've been looking for some documentation about how to Delete the thumbnail. All small examples I've seen is just to retrieve the current metadata tags, but not how to delete it.
ExifInterface only have function ExifInterface.setAttribute(String, String) But which one is the TAG to point null data to delete it or something similar?
Im using the support version of Exifinterface.
com.android.support:exifinterface:25.3.1
I have uploaded a static image (e.g., at location: /images/no-image.jpg) as part of my code that gets used as the default image when there is no specific image available (basically of the type: "no image for this item")
Just realized that this image may have to be served at more than one size (I have uploaded -- and want to upload -- just one size).
How do I resize this image using Google's Images Service?
If I use the example shown at https://developers.google.com/appengine/docs/java/images/#Java_Transforming_images_in_Java , that means having to read the file, apply the transform, then write a servlet to serve up the file... which seems like a lot of work. Is there an easier way?
Will it be easier to just upload the image to the BlobStore :-)?
You can add the following lines to your CSS file:
.placeholder {
background-image:url('../images/bg.png');
background-repeat:no-repeat;
background-size:contain;
background-position:center;
}
Now, when you don't have a specific image to serve, simply add "placeholder" class to your container element.
Remember to make this image cacheable.
I strongly recommend using the getServingUrl function for serving and resizing images for two reasons:
simpler to use. to resize, you just append parameters to the image url
It will significantly reduce the load off your instances, since the images are served without a servlet, but with google magic