image-manipulation

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

☆樱花仙子☆ 提交于 2019-11-26 16:45:20
问题 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

iPhone - having a Ripple effect on a UIImageView

独自空忆成欢 提交于 2019-11-26 14:06:52
问题 I am attempting to create a ripple like effect on an imageView when it is touched down on, however I do not understand how to implement OpenGL for windows and porting it to iOS. I have attempted to use http://www.codeproject.com/KB/openGL/dsaqua.aspx as well as cocos2d however I find the latter completely and utterly confusing. Would anyone be willing to give some suggestions or can point me in the right direction? Many thanks! 回答1: Use below for ripple effect in iPhone [UIView

iOS images in a bubble effect

对着背影说爱祢 提交于 2019-11-26 13:49:59
问题 I have some images that I want to "put inside a bubble". The bubbles kind of float around the screen with these images trapped inside them. The best is a way to combine the inside image with the bubble image and somehow warp the inside image to look like it is reflected on the inside of the bubble. Does anyone know how to achieve this effect without using textures and meshes? Perhaps someone remembers an old project or something that did something similar? Here is an example of what I mean:

Can you combine multiple images into a single one using JavaScript?

我的未来我决定 提交于 2019-11-26 13:19:18
问题 I am wondering if there is a way to combine multiple images into a single image using only JavaScript. Is this something that Canvas will be able to do. The effect can be done with positing, but can you combine them into a single image for download? Update Oct 1, 2008: Thanks for the advice, I was helping someone work on a js/css only site, with jQuery and they were looking to have some MacOS dock-like image effects with multiple images that overlay each other. The solution we came up with

How to cartoon-ify an image programmatically?

吃可爱长大的小学妹 提交于 2019-11-26 12:19:56
问题 My app works with photos and videos of people, which I want to cartoonify. So I need an algorithm to do it manually (we use c++/Qt for our product, which has image manipulation classes) or perhaps some CLI program that will do it for me that I can call and use from our own app. 回答1: Here's some algorithms to play with: Median or repeated box blur filter to obtain cartoonish color palette Edit: Bilateral filtering should suit your needs even better Min filter (zeroth percentile) to enhance

Can I access ImageMagick API with Python?

旧巷老猫 提交于 2019-11-26 10:31:23
问题 I need to use ImageMagick as PIL does not have the amount of image functionality available that I am looking for. However, I am wanting to use Python. The python bindings (PythonMagick) have not been updated since 2009. The only thing I have been able to find is os.system calls to use the command line interface but this seems clunky. Is there any way to access the API directly using ctypes and conversions of some sort? As a last resort is there any other library out there that has the

Javascript Image Resize

半世苍凉 提交于 2019-11-26 10:21:47
问题 Does anyone know how to resize images proportionally using JavaScript? I have tried to modify the DOM by adding attributes height and width on the fly, but seems did not work on IE6. 回答1: To modify an image proportionally, simply only alter one of the width/height css properties, leave the other set to auto. image.style.width = '50%' image.style.height = 'auto' This will ensure that its aspect ratio remains the same. Bear in mind that browsers tend to suck at resizing images nicely - you'll

OpenCV: how to rotate IplImage?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 09:48:18
问题 I need to rotate an image by very small angle, like 1-5 degrees. Does OpenCV provide simple way of doing that? From reading docs i can assume that getAffineTransform() should be involved, but there is no direct example of doing something like: IplImage *rotateImage( IplImage *source, double angle); 回答1: If you use OpenCV > 2.0 it is as easy as using namespace cv; Mat rotateImage(const Mat& source, double angle) { Point2f src_center(source.cols/2.0F, source.rows/2.0F); Mat rot_mat =

How to upload files in asp.net core?

青春壹個敷衍的年華 提交于 2019-11-26 09:25:58
问题 How to upload files or images using Asp.net MVC 6 with some model data? Example, I have a form like this; <form> <input type=\"file\"> <input type=\"text\" placeholder=\"Image name...\"> <input type=\"text\" placeholder=\"Image description...\"> <input type=\"submit\" value=\"Submit\"> </form> I read many Tutorials in how to upload but I don\'t see anything uploading with some data like the form above. Also, is there any library for image manipulation for re-sizing and Image Watermarking same

Bmp to jpg/png in C#

流过昼夜 提交于 2019-11-26 09:25:49
问题 Is there any way to convert a bmp image to jpg/png without losing the quality in C#? Using Image class we can convert bmp to jpg but the quality of output image is very poor. Can we gain the quality level as good as an image converted to jpg using photoshop with highest quality? 回答1: var qualityEncoder = Encoder.Quality; var quality = (long)<desired quality>; var ratio = new EncoderParameter(qualityEncoder, quality ); var codecParams = new EncoderParameters(1); codecParams.Param[0] = ratio;