image-manipulation

Command line batch image cropping tool

别来无恙 提交于 2019-12-20 08:59:16
问题 is there any lightweight command line batch image cropping tool(Linux or Windows) which can handle a variety of the formats ? 回答1: Imagemagick is what you want -- tried and true. 回答2: In Linux you can use mogrify -crop {Width}x{Height}+{X}+{Y} +repage image.png for CLI image manipulation 回答3: Imagemagick's convert does the trick for me (and much more than cropping): convert -crop +100+10 in.jpg out.jpg crops 100 pixels off the left border, 10 pixels from the top. convert -crop -100+0 in.jpg

Tint a partially transparent image in WPF

无人久伴 提交于 2019-12-19 09:19:23
问题 How can I tint/colorize an image in WPF (using MVVM) without sacrificing performance? A purely XAML solution would be ideal, as modifying bitmaps in the code will cause performance loss with lots of changing images. The image is made up of more than simple shapes, so it is not possible using a path. 回答1: Unlike WinForms/GDI+, WPF does not seem to contain any easy ways to colorize/tint an image as it is being rendered. Two ideas for accomplishing this are, using a shader, or overlaying a

How do I rotate an image in the frequency domain?

若如初见. 提交于 2019-12-19 07:40:22
问题 I've heard that it should be possible to do a lossless rotation on a jpeg image. That means you do the rotation in the frequency domain without an IDCT. I've tried to google it but haven't found anything. Could someone bring some light to this? What I mean by lossless is that I don't lose any additional information in the rotation. And of course that's probably only possible when rotating multiples of 90 degrees. 回答1: You do not need to IDCT an image to rotate it losslessly (note that

move_uploaded_file doesn't work, no error

你离开我真会死。 提交于 2019-12-19 06:30:08
问题 I am running running a script which moves an uploaded file with move_uploaded_file() . I have done this thousands of times but for some reason it's not working. I have confimred the following: <form> using method="post" and correct enctype correct file referenced from form directory has permissions 777 all the memory_limit , max_execution_time , etc are set to super high settings to avoid timeouts Basically, the script below returns with just Your image is too big. . I have also enabled ALL

Splitting image with imagemagick

旧巷老猫 提交于 2019-12-18 18:05:44
问题 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 # # ## # # # ### 回答1: You can do this in one single command and do it very efficiently. For example, this command: time convert \ very-very-large.png \ -quality

Calculate offset/skew/rotation of similar images in C++

£可爱£侵袭症+ 提交于 2019-12-18 12:35:48
问题 I have multiple images taken simultaneously pointing at the same direction from the same starting location. However, there is still a slight offset because these cameras were not in the exact same place when the picture was taking. I'm looking for a way to calculate the optimal translation/shear/skew/rotation needed to apply to match one image to another so that they overlay (almost) perfectly. The images are in a .raw format which I am reading in 16 bits at a time. I have been suggested (by

Image Resize in C# - Algorith to determine resize dimensions (height and width)

痴心易碎 提交于 2019-12-18 12:16:13
问题 I need to scale down an image that has a height or width greater than a predefined pixel value. I wrote some code that takes a look at the original image, checks to see if either the width, the height, or the height and width are greater than the Max Width/Max Height settings. I now need to figure out what dimensions to resize to based on the max of the latter value. For example: If the image is 900h x 300w and the MAX Height is 700h I will need to resize the height to 700 and the width to ??

Image Manipulation Filter like white Balance, Exposure, split Tone etc on IOS

雨燕双飞 提交于 2019-12-18 12:07:19
问题 I have been trying since one week to achieve some image manipulation filters like WHITE BALANCE, EXPOSURE and SPLIT TONING (as in Photoshop) for my IOS app, but I didn't get a standard implementation to achieve any of them. I found the shell scripts to achieve them through ImageMagick but don't know how to change these scripts to its equivalent in C or objective C. I simply uses some convert command to do the magic things. Thanks in advance. Please Help. White Balance is achievable through

Use PHP to convert JPEGs to transparent PNG

本小妞迷上赌 提交于 2019-12-18 12:06:43
问题 I have a lot of JPEG images that I want to convert to PNG images using PHP. The JPEGs are going to be uploaded by clients so I can't trust them to make sure they are in the right format. I also want to make their white backgrounds transparent. Does PHP have any functions I can use to achieve this? 回答1: After a few days of trying different solutions and doing some more research, this is what I found worked for me. $image = imagecreatefromjpeg( 'image.jpg' ); imagealphablending($image, true);

Android image filter libraries

筅森魡賤 提交于 2019-12-18 10:36:23
问题 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. 回答1: 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 回答2: 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