crop

How to auto crop an image?

笑着哭i 提交于 2019-12-28 04:32:07
问题 I am trying to make a scanning application. That application will scan the document and will display image in a picture box. The problem I am facing is image (Documents image which kept in the scanner or say ‘real ’image) is displaying inside another image with some background (That background color is also changing) its look like this image. I have tried lot of things but nothing giving me a perfect result I tried it with a forge.net. Here is the code I have tried. public static System

android:select image from gallery then crop that and show in an imageview

爱⌒轻易说出口 提交于 2019-12-27 19:13:08
问题 i really need this code and i searched for 3 hours on internet but i couldn't find a complete and simple code and i tested many codes but some didn't work and others wasn't good,please help me with a full and simple code,thank you edit:i have this code for select image but please give me a full code for all things that i said in title because i cant resemble codes. btn_choose.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub

How to draw Bitmap from ARGB_8888 Bitmap

白昼怎懂夜的黑 提交于 2019-12-25 06:35:46
问题 I am drawing paths on canvas and creating Transparent bitmap while saving and creating cropping bitmap from transparent bitmap. See Images : In this I mage I am drawing path on canvas and I am creating transparent bitmap and according to startX,lowestY and highestX,highestY Bitmap cropBitmap =Bitmap.createBitmap(sourceBitmap,startX,lowestY,highestX,highestY); When I am cropping Bitmap I want Only "Test" drawing crop bitmap.But it's giving empty bitmap. Like this Inside red box I want cropped

Easiest way to select screen region

无人久伴 提交于 2019-12-25 04:07:20
问题 I'm writing a simple program in C# + WPF that records/serializes user mouse and keyboard activities and then he can playback it. Some of its features require user to specify coordinates of a small area in the screen. Typing coordinates of top left and bottom right corners to textboxes is not very comfortable so I want to select it in similar way like Windows Snipping Tool, ZScreen/ShareX etc. do that. Something like that, maybe simplified What is the easiest way to implement that? I've

how to extract URI from the crop file?

点点圈 提交于 2019-12-25 03:05:15
问题 I am able to crop a picture from the camera or the gallery and put it on an ImageView and it is correctly displayed. But when I try to upload the picture to a server, the original picture was uploaded instead of the cropped one. How do I get the URI of the cropped picture? I think I am missing something in CROP_FROM_CAMERA : Pls help. Thanks very much. My crop and onstartactivity is as follows: protected void onActivityResult(int requestCode, int resultCode, Intent data) { // super

Cropping video stream in android-studio

时光毁灭记忆、已成空白 提交于 2019-12-25 02:26:43
问题 I want stream a very large video (lets say 5000x5000) and I want to crop it to show 1000x1000 chunks. Currently I do so by streaming the video via TextureView.SurfaceTextureListener. Scaling the video up to the point where one chunk fits my view and can be played. Here is a little snippit: Matrix matrix = new Matrix(); matrix.setScale(scaleX, scaleY, 0, 0); matrix.postTranslate(positionX, positionY); textureView.setTransform(matrix); However, since its such a big video, some devices cant play

image cropping with codeigniter no GD library - GD2 is intalled

醉酒当歌 提交于 2019-12-24 23:27:53
问题 I am working on media library for a website at the moment, and one of the features is that user can create a cropped version of an image that they upload. My problem however is this, when I try and crop the image, I get the following error, The path to the image is not correct. Here is my code, $config['image_library'] = 'gd2'; $config['source_image'] = "/media/images/products/".$this->data['image']; //die($config['source_image']); $config['maintain_ratio'] = FALSE; $config['x_axis'] = $this-

How can I crop original image in a pictureBox that shows image in Stretch mode?

Deadly 提交于 2019-12-24 12:10:08
问题 How can I crop an image in a pictureBox that shows in Stretch mode? I draw a rectangle in pictureBox : void pictureBox1_MouseUp(object sender, MouseEventArgs e) { //pictureBox1.Image.Clone(); xUp = e.X; yUp = e.Y; Rectangle rec = new Rectangle(xDown, yDown, Math.Abs(xUp - xDown), Math.Abs(yUp - yDown)); using (Pen pen = new Pen(Color.YellowGreen, 3)) { pictureBox1.CreateGraphics().DrawRectangle(pen, rec); } rectCropArea = rec; } void pictureBox1_MouseDown(object sender, MouseEventArgs e) {

How can I crop an image with negative crop-boundaries in Java?

微笑、不失礼 提交于 2019-12-24 11:18:03
问题 I have an image of some arbitrary size, and I need to crop it with negative boundary values. So, basically I have image (1) and I want to crop it to the dimensions of (2). (1) +---------------------------+ (2) | | +-----------------------------+ | | | | | | | | | | | | | | | | | +-----------------------------+ | | | +---------------------------+ Any ideas on how to solve this in Java? I've tried the Scalr library, but it doesn't support negative crop boundaries. 回答1: You don't need a library

Javascript Detect Screen Resolution, change css, crop images accordingly

五迷三道 提交于 2019-12-24 09:45:17
问题 So I know how to change the css depending on the resolution via javascript. How would one go about 'cropping' an image depending on the screen resolution? 回答1: Well you can get the screen details from window.screen - though personally I would recommend just finding out how big the current window is, the only reason not to is if you are going to resize the window and that is very frowned upon. Once you know the sizes and how big you need to make your images, I find that images are cropped