I tried everything, but it didn't work. Please help me
All you have to do it to download a transparent img of a cart and adjust the width and length you can also download it with the link below 👇👇
https://www.flaticon.com/free-icon/shopping-cart_833314?term=cart&page=1&position=3&page=1&position=3&related_id=833314&origin=search
If you have taken this image from your storage then you can simply convert it's background transparent by using any background remover tool online such as this one:
remove background
Related
I am working on a project in which I am using a lot of images. My friend has designed all the images in photoshop and all those images are of my required size.
But the problem is that when my friend exported those images from the photoshop, he exported those images with a transparent background and that transparent background with the image makes the frame size bigger than required. And when I set that image to some ImageView, it expands to the whole screen due to its bigger frame size.
Now my question is that Is there a way to set image in imageview so that the transparent part is automatically ignored and the image of my required size just sets into the imageview. Or It is required to crop those images in photoshop and then use those images.
I am sorry if someone couldn't understand the question but I can elaborate if asked.
The way I would do it would be just edit them in photoshop, but I found another way if you want to look into it. Its called webP and you can check it out here. With this you can skip the transparency, but I think the size would stay the same, You can try it out if you want though.
Hope this helps!
I am working on image processing i have achieved color effect using ColorMatrix but i cant understand how to achieved one effect that is not on whole image but only around the image like i have attached image. Actually i m working on image editor app like : BeFunkey
Here original image and processed image i have attached. You can see in effect on second image that is only around the image black shadow. Please can anybody tell me how to do this. Thank you in advance.
You need to set RGB colors of you bitmaps. Have a look over android-image-filter
This demo will fulfill your requirements.
In my android application I downloaded some png image and write them in sd card. when I show them in image view they are showing with black background. the original images have transparent background. How I can keep the background transparent. Please help me. I use PNG format to compress and write it to sd card
Set The View Background as
R.color.transparent
or in xml like
android:background="#android:color/transparent"
Edited :
Thanks for reply. yes I did this. I did just now One more thing, I set canvas color android.R.color.transparent and it worked
I have an image that is circular and I want to make the other junk in the image to be transparent. I've spent the last hour looking around and I can't seem to figure out how this is done for android. Any help is greatly appreciated!
I haven't worked with Android but on iOS pngs weren't loading for me when I made them in photoshop but when I made them in flash all of a sudden they would work! Try that first :)
Anyways, you want to google something along the line of "pixel arrays android code" you can create an array of each pixel, find an individual color, then make it transparent...
But I really think this is just a GIMP issue and you don't need to go through all of that hassle.
what i can understand from your uncleared words is that you want to display transparent image of a normal image you have . so i would suggest don't do it through programming . create a transparent image through any image editor tool and use it .
if image is dynamic that you cant go in this way so use Matrix and setAlpha . search over net for both the terms
I have a small project in which i download images from internet in the form of drawable and use them in Imageview for which i have provided functionality similar to an Imagebutton but without the gray edges.
The question is that is there any functionality in Android(similar to iphone) by which we can crop the drawable from edges to make them rounded edged drawable...
Even if its a "not-tested-neither-recommended" method, do let me know... i would like to work on this a bit... thanx in advance folks...
I believe this is probably the link you're looking for: How should I give images rounded corners in Android?
I tried doing it with a drawable and nested and elements, but wasn't able to get the image drawable to show properly. Not sure if there's a way to get this working or not.