image-manipulation

ImageMagick Reflection

走远了吗. 提交于 2019-12-22 05:59:15
问题 Brief: convert ( -size 585x128 gradient: ) NewImage.png How do I change the above ImageMagick command so it takes the width and height from an existing image? I need it to remain a one line command. Details: I'm trying to programatically create an image reflection using ImageMagick. The effect I am looking for is similar to what you would see when looking at an object on the edge of a pool of water. There is a pretty good thread on what I am trying to do here but the solution isn't exactly

Changing the color of an image based on RGB value

若如初见. 提交于 2019-12-22 05:06:12
问题 Situation: You have an image with 1 main color and you need to convert it to another based on a given rgb value. Problem: There are a number of different, but similar shades of that color that also need to be converted, which makes a simple 'change-all-(0,0,0)-pixels-to-(0,100,200)' solution worthless. If anyone can point me in the right direction as far as an algorithm or an image manipulation technique that would make this task more manageable that'd be great. I've been using PIL to attempt

How to Improve my php image resizer to support alpha png and transparent GIFs

喜你入骨 提交于 2019-12-21 23:30:45
问题 I use this function to resize images but i end up with ugly creepy image with a black background if it's a transparent GIF or PNG with alpha, however it works perfectly for jpg and normal png. function cropImage($nw, $nh, $source, $stype, $dest) { $size = getimagesize($source); $w = $size[0]; $h = $size[1]; switch($stype) { case 'gif': $simg = imagecreatefromgif($source); break; case 'jpg': $simg = imagecreatefromjpeg($source); break; case 'png': $simg = imagecreatefrompng($source); break; }

Canvas - flip half the image

落爺英雄遲暮 提交于 2019-12-21 21:30:03
问题 I have some image data in canvas, and now I need to take the left half of the image, flip it and apply it to the right, like a mirror effect. Example , from this: To this: I got this far (I have the image data ready): ctx.drawImage(this, 0, 0, 960, 540); var imgData = ctx.getImageData(0,0,960,540); // loop through the data and apply mirror ?? Width & height is known. Any ideas? 回答1: Loop through the image data If the current pixel is in the left half of the image, copy it to a position on the

How to scroll and zoom in/out large images on iPhone?

若如初见. 提交于 2019-12-21 20:17:37
问题 I have a large image, size around 30000 (w) x 6000 (h) pixels. You may consider it's like a big map. I assume I need to crop it up into smaller tiles. Questions: what are the right ViewControllers to use? (link) what is the tile strategy? (I put this in another question, as it's not iPhone specific) Requirements: whole image (though cropped) can be scrolled up/down/left/right by swipes zoom in (up to pixel-to-pixel) out (down to screen-fit-by-height) by the 2-finger operation memory

what are my research areas for image processing project?

限于喜欢 提交于 2019-12-21 19:55:08
问题 For my final year project I'm doing a vehicle detail modification system. the system should be able to these following tasks. I'm using a size image of a vehicle taken from a fixed distance lets say from 5m. and different colors and rim images are stored I'm my application, that is is the basic idea. detect the tire and the alloy rim of the vehicle detect and measure the rim size of the installed rim apply a new alloy rim to the vehicle ( embed or put the alloy rim on top of the original

.net image editor control [closed]

为君一笑 提交于 2019-12-21 17:42:52
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 months ago . I am looking for a .net control that allows for the editing of images. The following features would be desirable: Crop Zoom Pen Line Brush Circle Polygon Full undo / redo Measure Tool Layers(not critical) This control can either be Winforms or WPF, but would need to be extensible. I am happy for it to be a

SVG to JPG / PNG

谁都会走 提交于 2019-12-21 09:10:51
问题 Is there any working module to convert a SVG image into a pixel format like JPEG or PNG ? 回答1: Take a look at the Batik toolkit. Specifically the rasterizer: http://xmlgraphics.apache.org/batik/tools/rasterizer.html 回答2: If you're using PEAR you can the XML_svg2image package (http://pear.php.net/package/XML_svg2image/). If not you should take a look at ImageMagick command line tool (http://www.imagemagick.org/script/command-line-tools.php). The convert program is quite simple to use : http:/

How is the user id image generated on SO?

帅比萌擦擦* 提交于 2019-12-21 04:07:15
问题 I am a little curious about the cute little kaleidoscopic images associated with each user on this site. How are those generated? Possibilities are: A list of images is already there in some folder and it is chosen randomly. The image is generated whenever a user registers. In any case, I am more interested in what kind of algorithm is used to generate such images. 回答1: It's called an Identicon. If you entered and e-mail, it's a based on a hash of your e-mail address. If you didn't enter an e

RAW Image file - what format is my data in?

孤者浪人 提交于 2019-12-21 04:06:40
问题 I'm working on processing .raw image files, but I'm not sure how the image is being stored. Each pixel is a unsigned 16-bit value, with typical values ranging from 0 to about 1000 (in integer form). This isnt enough bits for hex values, and its not RGB (0-255) so I'm not quite sure what it is. Bonus: if you have any idea on how to convert this to grayscale in OpenCV (or just mathematically) that would be a huge help too. 回答1: The name RAW comes from the fact that the values stored in the file