image-manipulation

How to capture an image in android with coordinates

点点圈 提交于 2019-11-27 15:24:04
问题 Am new to android , and I would like place my problem in-front of you,, I would like to capture an image between four coordinates , as below.. First of all I convert the image into bitmap and then set it as background to a relative layout. And i know these four coordinates. Then how could I get the image inside the box and set it to another layout as background. Guys please let me out from this logic.... 回答1: finally i find the solution to my problem and i wana share it with you, first of all

C++: What's the simplest way to read and write BMP files using C++ on Windows?

强颜欢笑 提交于 2019-11-27 14:28:09
I would like to load a BMP file, do some operations on it in memory, and output a new BMP file using C++ on Windows (Win32 native). I am aware of ImageMagick and it's C++ binding Magick++ , but I think it's an overkill for this project since I am currently not interested in other file formats or platforms. What would be the simplest way in terms of code setup to read and write BMP files? The answer may be "just use Magick++, it's the simplest." Related Question: What is the best image manipulation library? When developing just for Windows I usually just use the ATL CImage class EasyBMP if you

iPhone: Blur UIImage

梦想与她 提交于 2019-11-27 14:17:17
问题 In my iPhone application I have a black-and-white UIImage . I need to blur that image (Gaussian blur would do). iPhone clearly knows how to blur images, as it does that when it draws shadows. However I did not found anything related in the API. Do I have to do blurring by hand, without hardware acceleration? 回答1: Try this (found here): @interface UIImage (ImageBlur) - (UIImage *)imageWithGaussianBlur; @end @implementation UIImage (ImageBlur) - (UIImage *)imageWithGaussianBlur { float weight[5

Java - I need a very fast image scaling algorithm

删除回忆录丶 提交于 2019-11-27 14:16:40
问题 I am working on a Midlet application. I am finding myself in the need to scale images very often. This has become a problem because some phones are pretty slow and scaling takes too long. Currently I'm using Image.createRGBImage(int, int, int, boolean) to scale the image. I was wondering if any of you knew of a very efficient and fast way to scale an image. Note: this is a Midlet application so only JavaME is available, meaning I don't have access to some other libraries available in the full

Merge two images to create a single image in C#.Net

强颜欢笑 提交于 2019-11-27 12:10:33
问题 I have a requirement wherein I need to merge two different png/jpeg images resulting into a single image using C#.Net. There will be a particular location defined on the source image wherein I need to insert another image. Can anybody suggest some links ? 回答1: This method merge two images one in the top of the other you can modify the code to meet for your needs: public static Bitmap MergeTwoImages(Image firstImage, Image secondImage) { if (firstImage == null) { throw new

Find known sub image in larger image

廉价感情. 提交于 2019-11-27 10:52:48
问题 Does anyone know of an algorithm (or search terms / descriptions) to locate a known image within a larger image? e.g. I have an image of a single desktop window containing various buttons and areas (target). I also have code to capture a screen shot of the current desktop. I would like an algorithm that will help me find the target image within the larger desktop image (what exact x and y coordinates the window is located at). The target image may be located anywhere in the larger image and

Memory efficient image resize in Android

你。 提交于 2019-11-27 10:02:26
问题 I am trying to reduce the size of images retrieved form the camera (so ~5-8 mega pixels) down to one a a few smaller sizes (the largest being 1024x768). I Tried the following code but I consistently get an OutOfMemoryError . Bitmap image = BitmapFactory.decodeStream(this.image, null, opt); int imgWidth = image.getWidth(); int imgHeight = image.getHeight(); // Constrain to given size but keep aspect ratio float scaleFactor = Math.min(((float) width) / imgWidth, ((float) height) / imgHeight);

Rounded Corners on UIImage

六月ゝ 毕业季﹏ 提交于 2019-11-27 10:01:54
I'm trying to draw images on the iPhone using with rounded corners, a la the contact images in the Contacts app. I've got code that generally work, but it occasionally crashes inside of the UIImage drawing routines with an EXEC_BAD_ACCESS - KERN_INVALID_ADDRESS . I thought this might be related to the cropping question I asked a few weeks back, but I believe I'm setting up the clipping path correctly. Here's the code I'm using - when it doesn't crash, the result looks fine and anybody looking to get a similar look is free to borrow the code. - (UIImage *)borderedImageWithRect: (CGRect)dstRect

C# - How to change PNG quality or color depth

橙三吉。 提交于 2019-11-27 09:26:15
I am supposed to write a program that gets some PNG images from the user, does some simple edits like rotation and saves them inside a JAR file so that it can use the images as resources. The problem is when I open, say an 80kb image and then save it with C#, I get an image with the same quality but for 130kb space. And because it has to go inside a J2ME jar file I really need lower sizes, at least the original size. I tried the code below but later found out that it only works for Jpeg images. ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders(); int j = 0; for (j = 0; j < codecs

Which library should I use for server-side image manipulation on Node.JS? [closed]

ⅰ亾dé卋堺 提交于 2019-11-27 09:10:19
问题 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 7 years ago . I found a quite large list of available libraries on Node.JS wiki but I'm not sure which of those are more mature and provide better