crop

iText - crop out a part of pdf file

依然范特西╮ 提交于 2019-12-08 03:08:03
问题 I have a small problem and I'm trying for some time to find out a solution. Long story short I have to remove the top part of each page from a pdf with itext. I managed to do this with CROPBOX , but the problem is that this will make the pages smaller by removing the top part. Can someone help me to implement this so the page size remains the same. My idea would be to override the top page with a white rectangle, but after many tries I didn't manage to do this. This is the current code I'm

How to crop image with the help of co-ordinates of template

左心房为你撑大大i 提交于 2019-12-07 20:28:44
问题 In my project, I am using nested FrameLayout . I have layout of activity as: <FrameLayout> ---------(1) <SurfaceView> <FrameLayout> ------(2) </SurfaceView> </FrameLayout> FrameLayout(2) shows a template. The activity captures image with custom camera API. The The user is supposed to fit the object of interst in template of FrameLayout(2) . After the image is captured, I want to crop that image such that only the object of interest that was fitted in template is available. The original image

angularJS make binary data image from base64 and send as image file to server

試著忘記壹切 提交于 2019-12-07 19:22:02
问题 I'm using this tool to crop images in my AngularJS app: https://github.com/fengyuanchen/cropper and then I try to store data to server, but now I send base64 code... How could I send normal cropped image binary code, not as base64? is it real? my code for uploading is such: var addImage = function(files) { var deferred = $q.defer(); var fd = new FormData(); var blob = new Blob([files], { type : "image/png"}); fd.append("file", blob); $http.post(settings.apiBaseUri + "/files", fd, {

C# images cropping,splitting,saving

我怕爱的太早我们不能终老 提交于 2019-12-07 16:00:38
问题 as stated in subject, i have an image: private Image testing; testing = new Bitmap(@"sampleimg.jpg"); I would like to split it into 3 x 3 matrix meaning 9 images in total and save it.Any tips or tricks to do this simple? I'm using visual studios 2008 and working on smart devices. Tried some ways but i can't get it. This is what i tried: int x = 0; int y = 0; int width = 3; int height = 3; int count = testing.Width / width; Bitmap bmp = new Bitmap(width, height); Graphics g = Graphics

How to crop only certain area using HTML5 + Javascript or server side language?

好久不见. 提交于 2019-12-07 13:40:16
问题 Before asking my question, I have a test page to make it everyone understand my question better. The URL is http://iamthemoon.com/crop/ You can move the red selection. I like to crop only the area of red selection. I thought it could be done easily in HTML5 canvas, but that was my mistake. First I googled about it 2 days, but I couldn't find a solution. There are many HTML5 based cropping tools, but they only have square selection. I then looked into PHP GD and imagemagick, but I couldn't

PHP - Mask polygon over image

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 07:31:03
问题 Hi Everyone (this is my first post), I am trying to figure a way of cropping a polygon out of an image. I have been reading other similar code. It seems that most code is based around the following process: Resize the image to fit the width and height of the polygon shape, Create a blank image of an unusual colour the same size, Overlay transparent pixels in the shape of the polygon, Overlay that on to the resized image Set the unusual colour to be transparent... My problem is I do not want

Is there any code to set wallpaper without cropping and zooming in android?

孤街醉人 提交于 2019-12-07 04:19:06
问题 i am creating a gallery app , my first app and this is my code Bitmap bmd = BitmapFactory.decodeStream(is); try{ getApplicationContext().setWallpaper(bmd); }catch(IOException e){ e.printStackTrace(); } The above code sets wallpaper But the wallpaper gets cropped or zoomed after it got set !! Is there any modification i can do in the above code so that i can set wallpaper without zooming or cropping when it is set !!!! Plzzzz help me out !! Thanks in advance :-) 回答1: I am late to reply this.

move,scale and crop the image in android like facebook profile picture

瘦欲@ 提交于 2019-12-07 00:31:48
问题 I want crop an image in my application.I tried a lot but not succeed. Its challenge to android developer. Is there any idea or reference to implement the features move,scale and crop the image in android like facebook upload profile pic. Now i am able to move, scale and crop and the image.But not consistant like facebook.I want to set fix image scale based on orientation.I attached the screen shot-3. My code as below:- crop_image.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns

Threshold value when converting image to 1bpp?

一世执手 提交于 2019-12-06 16:53:33
I don't know how to tag this question, please edit if possible. The job: Create an application which can auto-crop black borders in images in batch runs. Images vary in quality from 100-300dpi, 1bpp-24bpp and a batch can vary from 10 - 10 000 images. The plan: Convert image to 1bpp (bitonal, black/white, if it isn't already) and after "cleaning up" white spots/dirt/noise find where the black ends and the white begins, these are the new coords for the image crop, apply them to a clone of the original image. Delete old image, save new one. The progress: All of the above is done, and works, but..

Crop an image from gallery in android

☆樱花仙子☆ 提交于 2019-12-06 16:04:38
I want to crop an image in my application when it is selected from gallery.My cropping code work from the simulator but not properly work on phones. I set outputX=400 and outputY =487. In my simulator i get the output bitmap with 400 x 487 resolution,but when i cropped the image from phone gallery i get the output bitmap with 145 x 177 resolution. Why does it happen? My code for cropping is given below Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); intent.putExtra("crop", "true"); intent.putExtra("aspectX",