image-manipulation

Image manipulating with WPF

[亡魂溺海] 提交于 2019-12-13 12:38:48
问题 I want to have in my GUI capability for scale, rotate and crop images permanently (saving into the file the changes). WPF is natively capable of it? If it isn't, is there any component that can work more integrated with WPF? I also need to adjust image brightness and contrast, remove borders, for JPEG and TIFF formats. 回答1: Thisarticle posted on CodeProject explains a demo program that might be usefull for your needs. Chek out also this blog with an article speaking about brightness levels

imagemagick convert CMYK pdf to RGB jpeg or PNG and preseerve colors

佐手、 提交于 2019-12-13 11:34:05
问题 I have a cmyk pdf that I am trying to convert to a RGB jpeg or png file but have the colors stay pretty close to what the CMYK version is (compared to how photoshop does it) I am trying the following command but the colors change drastically from a red color to almost bright neon red and so on. Here is the command convert cmykpdf.pdf +profile icc -profile AdobeRGB1998.icc -colorspace sRGB jpegtesting.jpg Any ideas? or thoughts on how to do this. I tried saving it as a PNG also and same issue

Image effect in website

匆匆过客 提交于 2019-12-13 07:41:53
问题 Please can anyone tell me the coding in terms of Js, css for displaying image effect like one in http://dalailama.com/ ie changing of images one after another. If possible let me know about adding video link in the sidebar with the minor screen. 回答1: This should do the trick: HTML: <div id="testers"> <div class="tester"> <img src="http://regmedia.co.uk/2008/03/18/google_adwords_machine.png" alt="" /> </div> </div> <div id="morework"> <div class="holderdiv"> <div class="tester"> <img src="http

resize() not working using Image manipulation class

半腔热情 提交于 2019-12-13 07:25:01
问题 I’ve been reading the docs and trying everything to make thumbs out of uploaded images but I can’t seem to find the problem. Images are uploaded and saved correctly but thumbs are not, it fails with no error output. This is the code I’m using: $data = $this->upload->data(); $config_image['image_library'] = 'gd'; $config_image['source_image'] = $data['full_path']; $config_image['new_image'] = 'uploads/thumbs/'; $config_image['create_thumb'] = TRUE; $config_image['maintain_ratio'] = TRUE;

How to change, modify, cut and swap pixels from BITMAP

三世轮回 提交于 2019-12-13 04:57:42
问题 I want to modify a bitmap: change (swap) pixel position (for later rectification of fish eye) divide bitmap in sub-bitmaps (e. g. make 4 bitmaps out of 1) (for later texturizing of different GL_QUADS) For this I need the code how to modify pixels of a bitmap. The follwing code example works and creates a texture from a file: HBITMAP hbpInput = (HBITMAP)::LoadImage(NULL, filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); BITMAP bmpOutput; ::GetObject (hbpInput, sizeof

How to find different shades of a color in Java?

♀尐吖头ヾ 提交于 2019-12-13 04:51:03
问题 If I have the RBG code of a number, such as -16777216 (black), how can I find other similar shades of black using this color code? I'm trying to convert an image to monochrome by marking all pixels which are not -16777216 to be white. However, often there are varying shades of black which are found, but they are lost because they are not an exact match. Edit: I'm having a bit of trouble. When I try to use this color to find shades of black, so I can ignore them while converting the other

How to do this image zooming trick in a browser?

倖福魔咒の 提交于 2019-12-13 03:49:11
问题 I would like to do the following trick in a browser: Create three image files of different size (small, medium, large) from one picture. First, display the small image in a browser. When a user zooms in the small image replace it with the medium one. Now the user can scroll it within the window up and down, left and right. When a user zooms out the small image replace it with the small one, etc. I would prefer JavaScript (Flash is the second option). What tool would you recommend ? 回答1: A

When copying a picture in Jython/Python, how to copy X pixels less with every row

不想你离开。 提交于 2019-12-13 01:29:49
问题 I'm writing a code in Jython, that will copy part of one picture into an empty picture, but I want it to copy (let's say) 10 pixels less with each next row. I don't think I make sense, let me explain with an example. A picture 100 pixels by 100 pixels, the program will copy the first row (100pixels) of pixels into the new picture, but for second row of pixels I want it to copy only 90 pixels, then for the third row 80 pixels, and so on. Here I have a code that will copy part of a picture, but

Codeigniter Image Manipulation Class : Resize and Crop on multiple files

*爱你&永不变心* 提交于 2019-12-13 01:13:06
问题 I'm struggling to get the CodeIgniter Image Manipulation working correctly. Either it's a bug or I'm just not seeing it. I hope someone can help me with it. Thanks in advance! On the script: I want to create thumbnails (176w x 132h). The input images are in different sizes and ratios. In order to always get this size I first resize them to fit the max width or height (depending on image orientation) and then crop in the center. I've tried to do it all in 1 method. That didn't work, so I

How to shear image in Android?

佐手、 提交于 2019-12-12 20:09:07
问题 is it possible to shear image in Android? Seems I can't find any tutorial of it. 回答1: Perhaps you've found the solution, but just in case, I think this is what you needed: Bitmap src = BitmapFactory.decodeResource(this.getResources(), drawable.sample); int width = src.getWidth(); int height = src.getHeight(); float skewX = 5.0; float skewY = 6.0; Matrix matrix = new Matrix(); matrix.setSkew(skewX, skewY); Bitmap img = Bitmap.createBitmap(src, 0, 0, width, height, matrix, true); 回答2: This May