image-manipulation

4-point transform images

不问归期 提交于 2019-11-30 05:03:07
问题 I need to transform bitmap images with their 4 corner points moved from one location to another. Any code that can run on Windows, C#/VB.NET preferably, even help how to use scriptable programs like Paint.NET or Photoshop would be accepted. The Java Advanced Imaging API sounds hopeful. I need it for a screenshot manipulation system, which allows you to get such effects: (source: wholetomato.com) 回答1: Check out the Perspective warping examples from ImageMagick. It is available for most

Rich image scroll and zooming on android

限于喜欢 提交于 2019-11-30 04:25:53
I'm looking for a way to implement image zoom and scrolling the way it is implemented in Droid Comic Viewer . Is there any quick way to do that? If not, then could you please give some advices at least on implementing kinetic scrolling. It wasn't quick for us. When we implemented that part of Droid Comic Viewer we used the source code of ScrollView as reference to create a view able to handle horizontal and vertical scrolling. Scrolling and zooming have a lot of quirks that we gradually solved, and some of them that we still have to solve. If you're not in a hurry, we plan to release the

How to scale an image (in data URI format) in JavaScript (real scaling, not using styling)

天涯浪子 提交于 2019-11-30 03:59:35
We are capturing a visible tab in a Chrome browser (by using the extensions API chrome.tabs.captureVisibleTab) and receiving a snapshot in the data URI scheme (Base64 encoded string). Is there a JavaScript library that can be used to scale down an image to a certain size? Currently we are styling it via CSS, but have to pay performance penalties as pictures are mostly 100 times bigger than required. Additional concern is also the load on the localStorage we use to save our snapshots. Does anyone know of a way to process this data URI scheme formatted pictures and reduce their size by scaling

Implementation of KenBurns effect on Android with dynamic bitmaps setting

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 02:27:22
Background I am working on an implementation of the " KenBurns effect " (demo here ) on the action bar , as shown on this library 's sample (except for the icon that moves, which I've done so myself). In fact, I even asked about it a long time ago ( here ), which at this point I didn't even know its name. I was sure I've found a solution, but it has some problems. Also, since I sometimes show the images from the device, some of them even need to be rotated, so I use a rotatableDrawable (as shown here ). The problem The current implementation cannot handle multiple bitmaps that are given

Image downsampling algorithms

白昼怎懂夜的黑 提交于 2019-11-30 00:18:26
What's the best re-sampling algorithm I can use to divide an image into half its original size. Speed is of primary importance but it shouldn't degrade quality too bad. I'm basically trying to generate an image pyramid. I was originally planning to skip pixels. Is this the best way to go? From what I've read the image produced by pixel skipping is too sharp. Could someone who has tried this comment. My images contain map data sort of like this. Mark Ransom Skipping pixels will result in aliasing, where high frequency changes (such as alternating light/dark bands) will convert to low

Crop and rotate images with JS and PHP

梦想与她 提交于 2019-11-29 22:47:26
问题 Having been Googling for a tool for a few days, I have found nothing apart from Kroppr but there's no way I can commit to using a tool that can't be tested locally before deployment. All I need is something that can provide the facility for a user to crop and rotate an image, and have the server save it, overriding the original image. There seems to be plenty of cropping tools out there but nothing that can rotate as well. Is there such a tool? 回答1: No one has answered this yet? Hmmm well I

Get, or calculate the entropy of an image with Ruby and imagemagick

a 夏天 提交于 2019-11-29 21:13:38
问题 How to find the "entropy" with imagemagick, preferably mini_magic, in Ruby? I need this as part of a larger project, finding "interestingness" in an image so to crop it . I found a good example in Python/Django, which gives the following pseudo-code: image = Image.open('example.png') histogram = image.histogram() # Fetch a list of pixel counts, one for each pixel value in the source image #Normalize, or average the result. for each histogram as pixel histogram_recalc << pixel / histogram.size

Android image filter libraries

浪尽此生 提交于 2019-11-29 21:08:47
Are there any image libraries available for Android as seen in http://www.jhlabs.com/ip/filters/index.html ? Or have some one ported the same? Thanks in advance. I didn't try the code yet. but I run the sample app. I think it is good to use, https://github.com/finebyte/android-jhlabs I know this is an old topic, but in the absence of the AWT libraries I have started porting some image filters from the Marvin Image framework ( found here ) I have set it up as a googlecode project here so feel free to go check it out. Samsung S Pen SDK Has image filters. The filters are implemented for ARM

Creating mask with CGImageMaskCreate is all black (iphone)

此生再无相见时 提交于 2019-11-29 20:31:12
I'm trying to create an image mask that from a composite of two existing images. First I start with creating the composite which consists of a small image that is the masking image, and a larger image which is the same size as the background: UIImage * BaseTextureImage = [UIImage imageNamed:@"background.png"]; UIImage * MaskImage = [UIImage imageNamed:@"my_mask.jpg"]; UIImage * ShapesBase = [UIImage imageNamed:@"largerimage.jpg"]; UIImage * MaskImageFull; CGSize finalSize = CGSizeMake(480.0, 320.0); UIGraphicsBeginImageContext(finalSize); [ShapesBase drawInRect:CGRectMake(0, 0, 480, 320)];

How to repeat an image in C#

会有一股神秘感。 提交于 2019-11-29 17:27:33
问题 I have an image with a certain pattern. How do I repeat it in another image using GDI? Is there any method to do it in GDI? 回答1: In C#, you can create a TextureBrush that'll tile your image wherever you use it, and then fill an area with it. Something like this (an example that fills the whole image)... // Use `using` blocks for GDI objects you create, so they'll be released // quickly when you're done with them. using (TextureBrush brush = new TextureBrush(yourImage, WrapMode.Tile)) using