image-manipulation

Overlay non-transparent area of image with CSS

十年热恋 提交于 2019-12-01 01:47:41
问题 I am interested in dynamically modifying an image with transparent background, and achieving that using CSS. What I actually need, is creating a kind of a silhouette, so that all non-transparent pixels, have a color applied to them. In this case, Black. The before and after should look something like this: Note both images have a transparent background. Is there a method that can be used to perform this using CSS? If not, is there an easy way to generate the silhouette and switch between the

Fast Perspective transform in Java Advanced Imaging API

守給你的承諾、 提交于 2019-12-01 00:02:35
For the needs of my program I have created a facility to distort an image and place it on a map (my program is a map based program). I wrote my own mechanism for placing and distorting the image using three points that are placed on the image, three points that are placed on the map and then what I simply do it create an AffineTransform that transforms the first triangle to the second, in effect placing the image exactly where I want it and transformed to fit what the user wanted. The problem is that with AffineTransforms you can only perform the most basic of transformations. You can

Resizing an image on the fly using CodeIgniter

眉间皱痕 提交于 2019-11-30 20:16:25
问题 I am working on a script that downloads a file from Dropbox, supposed to resize that image and then shoot it up to an S3 bucket. For some reason, I can't get the image to resize. I keep getting the following error: The path to the image is not correct. Your server does not support the GD function required to process this type of image. Code Base: public function resize_test() { $postcard_assets = $this->conn->getPostcardDirContent("folder_name", "Photos", TRUE); foreach($postcard_assets[

Fast Perspective transform in Java Advanced Imaging API

陌路散爱 提交于 2019-11-30 18:56:56
问题 For the needs of my program I have created a facility to distort an image and place it on a map (my program is a map based program). I wrote my own mechanism for placing and distorting the image using three points that are placed on the image, three points that are placed on the map and then what I simply do it create an AffineTransform that transforms the first triangle to the second, in effect placing the image exactly where I want it and transformed to fit what the user wanted. The problem

Splitting image with imagemagick

孤者浪人 提交于 2019-11-30 16:19:57
I have a large image made up of lots of smaller images (not-touching) on a transparent background. Like a spritesheet, but the sprites aren't all the same size, nor are they laid out on a grid. Can I use ImageMagick to split the image into smaller images? So, for example, this: (where # = colored pixel) # ## # # # # ### Becomes these # # ## # # # ### You can do this in one single command and do it very efficiently. For example, this command: time convert \ very-very-large.png \ -quality 85 \ -write mpr:mpc:label \ +delete \ mpr:mpc:label -crop '3000x2001+0+491' -resize '170x116!>' -write pic1

Crop and rotate images with JS and PHP

社会主义新天地 提交于 2019-11-30 16:07:48
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? No one has answered this yet? Hmmm well I think you are going to have a hard time finding a tool that does exactly what you like. I imagine you are

C# Checking if an image exists within another image

二次信任 提交于 2019-11-30 14:08:15
问题 I'm not sure where to start with this so some guidance would be good. What I need to achieve is, examine a large image (say 1280x1024) and check to see if another smaller image exists within it or not (maybe a 50x50 pixel image). I tried doing this by comparing every pixel which is really slow and I may need to do it 100+ times so it doesn't seem suitable. I'm just wondering if there is a better way? Thanks 回答1: I was just working on something similar and the quick and dirty result I came up

Making a color completely transparent in OpenCV

纵然是瞬间 提交于 2019-11-30 13:06:15
问题 I have a basic png file with two colors in it, green and magenta. What I'm looking to do is to take all the magenta pixels and make them transparent so that I can merge the image into another image. An example would be if I have an image file of a 2D character on a magenta background. I would remove all the magenta in the background so that it's transparent. From there I would just take the image of the character and add it as a layer in another image so it looks like the character has been

Implementation of KenBurns effect on Android with dynamic bitmaps setting

♀尐吖头ヾ 提交于 2019-11-30 12:04:40
问题 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

How to repeat an image in C#

允我心安 提交于 2019-11-30 11:44:32
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? 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 (Graphics g = Graphics.FromImage(destImage)) { // Do your painting in here g.FillRectangle(brush, 0, 0,