crop

Django app for image crop using a cropping tool

谁说胖子不能爱 提交于 2019-12-20 08:50:55
问题 I need an app for crop an image in the client side, I mean, using a cropping tool like Jcrop jquery plugin. I found this tools: django-image-cropper django-image-cropping django-imagehandler django-avatar-crop But the last two depends of admin and the two first seem very coupled to ther own ImageFields and models, any good solution? We are working over a big application with many features and is very difficult change the logic writed 回答1: I think this is something that you will probably be

Cut transparent parts image

独自空忆成欢 提交于 2019-12-20 06:36:55
问题 The updated image: thanks you very much man but i wanted to do somthing little different, to cut each rectangle here as a sperate image.Lets try first to find the blue block Bounds. Sounds hard but its actually simple. look when i have done so far: private unsafe Bitmap CodeImage(Bitmap bmp) { Bitmap bmpRes = new Bitmap(bmp.Width, bmp.Height); BitmapData bmData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), System.Drawing.Imaging.ImageLockMode.ReadOnly, bmp.PixelFormat); IntPtr

libgdx Cutting an image

匆匆过客 提交于 2019-12-20 04:30:47
问题 I have been trying to "cut" an image for some time now, I ll explain why and what I tried. So I wanted to create an hp "bar" except it's not a bar but a heart and so I though it would be easy all I had to do is have two pictures draw them on top of each other and then just cut one to make it appear as in hp was being lost, but I was not able to find a way to cut the image. Setting the height just resizes the image as you might have guessed I tried using textureRegion to kind of hack it but it

Android video crop using ffmpeg

雨燕双飞 提交于 2019-12-20 03:23:26
问题 I am using https://github.com/WritingMinds/ffmpeg-android-java for cropping a video using this command : execFFmpegCommand(" -i " + in + " -filter:v " + "crop=" + 240 + ":" + 120 + ":" + 100 + ":" + 100 + " -c:a copy " + out); where "in" is inputfile and "out" is outputfile. I went through a lot of same questions and couldn't find required solution for this. I also tried the following command which i found going through the search: execFFmpegCommand(" -i " + in + " -filter:v " + "crop=" + 240

Crop function BitBlt(…)

﹥>﹥吖頭↗ 提交于 2019-12-20 03:18:32
问题 I want to create a crop function in an existing engine. This is what I already have: bool Bitmap::Crop(RECT cropArea) { BITMAP bm; GetObject(m_Handle, sizeof(bm), &bm); HDC hSrc = CreateCompatibleDC(NULL); SelectObject(hSrc, m_Handle); HDC hNew = CreateCompatibleDC(NULL); HBITMAP hBmp = CreateCompatibleBitmap(hNew, bm.bmWidth, bm.bmHeight); HBITMAP hOld = (HBITMAP)SelectObject(hNew, hBmp); BitBlt(hNew, 0, 0, bm.bmWidth, bm.bmHeight, hSrc, 0, 0, SRCCOPY); SelectObject(hNew, hOld); DeleteDC

Crop image in CSS

我是研究僧i 提交于 2019-12-19 16:35:14
问题 I've created a two-column grid of images, which works fine with all-landscape images: Link. However, I've added a portrait image that throws off the layout, so I'd like to be able to "crop" the image so that the height matches the others'. I tried using a negative margin, but it had no effect: .portrait-crop { overflow: hidden; } img.portrait-crop { margin-bottom: -30px; } I'm not sure what I'm doing wrong. Any help would be appreciated. For reference, this is my code. 回答1: You need to put

I want to save only the cropped image into the gallery. but it saves the original full image. how to save only the cropped image?

时光怂恿深爱的人放手 提交于 2019-12-19 11:47:47
问题 public class ImageCroppMainActivity extends Activity implements OnClickListener{ final int CAMERA_CAPTURE = 1; //keep track of cropping intent final int PIC_CROP = 2; //captured picture uri private Uri picUri; final int PICK_IMAGE = 3; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_image_cropp_main); //retrieve a reference to the UI button Button captureBtn =

Cropping whitespace from image in C# [duplicate]

夙愿已清 提交于 2019-12-19 09:48:04
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Remove surrounding whitespace from an image I'm looking for help to crop the whitespace on the top, bottom, left and right of an image. I have found the following question/answer on SO, however the link with the answer is to a third party site, which does not appear to be up anymore. 回答1: Found a solution here, but modified the return code section to allow for an empty image to be input, in which case the

Howto crop area outside polygon?

非 Y 不嫁゛ 提交于 2019-12-19 09:37:44
问题 I'd like to make transparent anything outside a predefined polygon in PHP. Let's say, you have the shape of your head then anything else of the image should be binned. Thanks a lot in advance! To make myself clear, here's some code I've been working on: $dat = dirname(__FILE__)."/foto_".time().".png"; $img = imagecreatefrompng("foto.png"); $points = array(93,36,147,1,255,-5,294,37,332,114,327,189,315,249,303,291,290,327,260,360,205,404,165,407,131,376,86,325,62,236,61,155,66,96,77,57,87,45);

Problem in cropping the UIImage using CGContext?

五迷三道 提交于 2019-12-19 03:58:15
问题 I developing the simple UIApplication in which i want to crop the UIImage (in .jpg format) with help of CGContext. The developed code till now as follows, CGImageRef graphicOriginalImage = [originalImage.image CGImage]; UIGraphicsBeginImageContext(originalImage.image.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGBitmapContextCreateImage(graphicOriginalImage); CGFloat fltW = originalImage.image.size.width; CGFloat fltH = originalImage.image.size.height; CGFloat X = round(fltW/4);