image-editing

getbbox method from python image library (PIL) not working

不想你离开。 提交于 2020-03-17 07:23:07
问题 I want to crop an image to its smaller size, by cutting the white areas on the borders. I tried the solution suggested in this forum Crop a PNG image to its minimum size but the getbbox() method of pil is returning a bounding box of the same size of the image, i.e., it seems that it doesn't recognize the blank areas around. I tried the following: >>>import Image >>>im=Image.open("myfile.png") >>>print im.format, im.size, im.mode >>>print im.getbbox() PNG (2400,1800) RGBA (0,0,2400,1800) I

getbbox method from python image library (PIL) not working

半世苍凉 提交于 2020-03-17 07:23:06
问题 I want to crop an image to its smaller size, by cutting the white areas on the borders. I tried the solution suggested in this forum Crop a PNG image to its minimum size but the getbbox() method of pil is returning a bounding box of the same size of the image, i.e., it seems that it doesn't recognize the blank areas around. I tried the following: >>>import Image >>>im=Image.open("myfile.png") >>>print im.format, im.size, im.mode >>>print im.getbbox() PNG (2400,1800) RGBA (0,0,2400,1800) I

How to get the zoomed image bounds

为君一笑 提交于 2020-02-07 05:15:32
问题 I am performing zooming on the image, after zooming I need to find the current visible bounds (i.e.) zoomed area bounds. Since I need to add another element (Rectangle or any shape)on the center of the image, so even after panning, it should add at the center of the zoomed image. Need to find the bounds marked in the image. Zoomed Image <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="50"/> </Grid.RowDefinitions> <ScrollViewer HorizontalScrollBarVisibility=

Java padding image

亡梦爱人 提交于 2020-01-01 08:49:53
问题 I am working on creating an online image editing tool.Looking for some refernce how can I add an image with white space on right side.For example see this image 回答1: Presumably, you want to create a new image from an existing image, where the new image has white space on the left and right? Suppose the unpadded image was a BufferedImage and is called 'image'. Suppose the amount of whitespace you want on each side is 'w'. What you want to do is create a new BufferedImage wider than the

Putting some indicator around the image in image move/resize/rotate operations

妖精的绣舞 提交于 2019-12-31 08:12:13
问题 I would like to Scale, Move, Resize Image. I would like to surround the image with Indicators which guide user what operation these indicators perform i.e. Moving, Rotating, Scaling. I've tried Scaling - but it only crops down. No chance to increase length and height of image. Rotate - achieved but via inserting manual degrees. That's not a good option in here. Moving - as I'm achieving drag on Api < 11. So little bit of difficult. Still no hope in here. Is there any library which can do me

How to make simple image to animated image like GIF?

筅森魡賤 提交于 2019-12-24 09:27:51
问题 I wont to make simple image to Animated image like GIF.I can select the image for gallery and store in image file.But, How i can modify image file to animated image or GIF File . 回答1: you have to select images you want to make GIF, then use bitmaps and run code in background Thread/Asynchtask: Here i used Drawable, in your case convert images into bitmap and use it. Bitmap one=BitmapFactory.decodeResource(getResources(),R.drawable.neon0); Bitmap two=BitmapFactory.decodeResource(getResources()

Visual Studio 2015 Icon Editor

早过忘川 提交于 2019-12-12 10:36:43
问题 I started using Visual Studio 2015 since a couple of months and just noticed that the Icon Editor is missing!!! In previous versions' of Visual Studio I always used the Image Editor for editing icons, but in 2015 I can't find it and, if I double click on an icon file it opens the Paint. Maybe I forgot something on the installation or did Microsoft remove it from Visual Studio? 回答1: Did you install C++? I had the same problem, but was resolved after installing 来源: https://stackoverflow.com

Bitwise color filter in MATLAB

夙愿已清 提交于 2019-12-08 06:01:16
问题 Is there a MATLAB function that does the following: For an image input, it tells me what proportion of the bits are darker than a particular color of my choosing. So if I entered an image of a chess board and used the color gray, the output would be roughly one half. (the image I need to process in this way is not that simple, though) 回答1: function CompareMap = BitWiseCompare('filename',c) % c = [R , G , B]; A = imread('filename'); CompareMap = zeros([size(A,1),size(A,2)]); CompareMap = (A(:,

Photoshop-like, embeddable web based image editor? [closed]

不问归期 提交于 2019-12-07 04:11:34
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Online Image Editor - Ajax or Flex / Flash? The above wasn't really the answer that I was looking for. I'm looking for an online image

How to add custom frames to images programmatically

泄露秘密 提交于 2019-12-06 06:43:50
问题 I want to create an app where i need to add frames to the images.i don't have any idea regrading this.i got one link where the frames are added to the images.could anybody help me. Here is the link @Thanks in Advance!! 回答1: Edit: Gallery OnItemClickListener gallery.setOnItemClickListener(new OnItemClickListener() { Bitmap frame = null, out = null; @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { Bitmap urImage = BitmapFactory.decodeResource(getResources