crop

Crop Image with face detection in android

爱⌒轻易说出口 提交于 2019-12-17 10:37:26
问题 I needed a demo where any image can be cropped with the face detection function. FIXED But after few surfing hours I didn't come to a single demo, so I prepared a single demo with conjunction of few demos that I found online. I have prepared a demo to crop the image. My demo crops the image rectangle, and circular as well. Also it detects the face and crops the image according to the face detection. I am using the following image to crop it. And the screenshot of the crop result is : The xml

How to animate ImageView from center-crop to fill the screen and vice versa (facebook style)?

六月ゝ 毕业季﹏ 提交于 2019-12-17 10:37:13
问题 Background Facebook app has a nice transition animation between a small image on a post, and an enlarged mode of it that the user can also zoom to it. As I see it, the animation not only enlarges and moves the imageView according to its previous location and size, but also reveals content instead of stretching the content of the imageView. This can be seen using the next sketch i've made: The question How did they do it? did they really have 2 views animating to reveal the content? How did

Cropping image in PHP

二次信任 提交于 2019-12-17 07:37:13
问题 I'd like crop an image in PHP and save the file. I know your supposed to use the GD library but i'm not sure how. Any ideas? Thanks 回答1: You could use imagecopy to crop a required part of an image. The command goes like this: imagecopy ( resource $dst_im - the image object , resource $src_im - destination image , int $dst_x - x coordinate in the destination image (use 0) , int $dst_y - y coordinate in the destination image (use 0) , int $src_x - x coordinate in the source image you want to

Cropping image in PHP

一曲冷凌霜 提交于 2019-12-17 07:36:30
问题 I'd like crop an image in PHP and save the file. I know your supposed to use the GD library but i'm not sure how. Any ideas? Thanks 回答1: You could use imagecopy to crop a required part of an image. The command goes like this: imagecopy ( resource $dst_im - the image object , resource $src_im - destination image , int $dst_x - x coordinate in the destination image (use 0) , int $dst_y - y coordinate in the destination image (use 0) , int $src_x - x coordinate in the source image you want to

Crop whitespace from image in PHP

六月ゝ 毕业季﹏ 提交于 2019-12-17 05:45:14
问题 Is it possible to remove the whitespace surrounding an image in PHP? NOTE: to clarify I mean something like photoshops trim feature. Thanks. 回答1: To trim all whitespace, as you call it, surrounding the interesting part of the image, first we find out where the "whitespace" stops, and then we copy everything inside of those borders. //load the image $img = imagecreatefromjpeg("http://ecx.images-amazon.com/images/I/413XvF0yukL._SL500_AA280_.jpg"); //find the size of the borders $b_top = 0; $b

Set dimensions for UIImagePickerController “move and scale” cropbox

风格不统一 提交于 2019-12-17 05:42:07
问题 How does the "move and scale screen" determine dimensions for its cropbox? Basically I would like to set a fixed width and height for the "CropRect" and let the user move and scale his image to fit in to that box as desired. Does anyone know how to do this? (Or if it is even possible with the UIImagePickerController) Thanks! 回答1: Not possible with UIImagePickerController unfortunately. The solution I recommend is to disable editing for the image picker and handle it yourself. For instance, I

How to crop the parsed image in android?

强颜欢笑 提交于 2019-12-17 04:27:09
问题 I am parsing a website to display the contents in a URL, in that some images are there. I want to crop the images which are parsed from the site. I'm really struggling on this, can any one help me regarding on this? 回答1: I assume you've already "got" the images down from the website and want to resize rather than crop? I.e. create thumbnails. If so, you can use the following: // load the origial BitMap (500 x 500 px) Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), R.drawable

How to select and crop an image in android?

末鹿安然 提交于 2019-12-17 03:25:18
问题 Hey, I am currently working on a live wallpaper and I allow the user to select an image which will go behind my effects. Currently I have: Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); i.putExtra("crop", "true"); startActivityForResult(i, 1); And slightly under that: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == 1) if

Cropping a JPG without loading all of it in memory

扶醉桌前 提交于 2019-12-14 04:23:15
问题 How can I crop a big JPG and extract a small portion of it? The problem is main JPGs are so big and I can't load all of it in memory. I used convert.exe from ImageMagick, but it's not working properly on all versions of windows and I prefer some C# method instead of a standalone exe. 回答1: There are a couple of possibilities. You could use stream which is part of ImageMagick, or vips . Let's do stream first. I can make a large (10,000x5,000) JPEG like this: convert -size 10000x5000 xc:blue

php resize image after upload and crop it to the center

浪子不回头ぞ 提交于 2019-12-14 03:59:22
问题 i have a user profile in php and i want to give users the choice of changing their profile picture. But when they submit their new picture via $_POST i want the picture to be resized to: height:110px | width:relevant to the height (if the width is bigger than height) width:110px | height:relevant to the width (if the height is bigger than width) when the resize is done, i want to crop the picture so it becomes 110px x 110px but i want it to be centered. For example if the user uploads a