Search found 43 matches

by rohitkrishna
2012-04-25T23:27:40-07:00
Forum: Users
Topic: [Solved]Reading File Paths from a text File
Replies: 9
Views: 14063

[Solved]Reading File Paths from a text File

Hi every one, Iam trying to read paths of images from a text file and load them into wands...im getting a status problem...can anyone please help me with it and i want to write all images with a different file name ..im trying something like this... int main(int argc,char **argv) { MagickWand *magic...
by rohitkrishna
2012-01-27T10:59:38-07:00
Forum: Users
Topic: Using PixelSetColor()
Replies: 2
Views: 6532

Re: Using PixelSetColor()

The problem is that you have to pass "rgb(a,b,c)" as a string so anything inside the string is not interpreted as variables. But you could use sprintf to create the string and then pass that. e.g. char rgb_string[64]; . . . sprintf(rgb_string,"rgb(%d,%d,%d)",a,b,c); PixelSetColo...
by rohitkrishna
2012-01-26T21:09:42-07:00
Forum: Users
Topic: Using PixelSetColor()
Replies: 2
Views: 6532

Using PixelSetColor()

Hi everyone... Iam trying to use PixelSetColor() in my program..i have a doubt ..can i give variables instead of numbers is the second argument like rgb(a,b,c) [in which r,g,b values are stored in a b,c] instead of rgb(0,255,0)...Iam attaching my code here...When i use variables its not working... a...
by rohitkrishna
2012-01-26T17:11:19-07:00
Forum: Users
Topic: PixelSetColor problem with CMYK images
Replies: 4
Views: 8300

Re: PixelSetColor problem with CMYK images

Maay be you can use cmyk(100,100,100,10) instead of r,g,b(0,0,255)
by rohitkrishna
2012-01-24T19:46:07-07:00
Forum: Users
Topic: Setting new color to a pixel
Replies: 0
Views: 3129

Setting new color to a pixel

Hi everyone... Iam trying to use PixelSetRed(),PixelSetGreen(),PixelSetBlue() functions...to change the r,g,b of a particular pixel...iam storing the actual r,g,b values in an array and manipulating them and then trying to produce an image with the modified values...I divided the image into sub-imag...
by rohitkrishna
2012-01-06T13:35:39-07:00
Forum: Users
Topic: Store pixels in sub image wise in 2d array
Replies: 2
Views: 5658

Store pixels in sub image wise in 2d array

Hi Everyone,

Can any one please explain me how can i store the r,g,b values of a image..by sub-image wise in a 2d array using image magick...?

Lets say an image is of 15x15..i have to store the r,g,b values in 2d array by 5x5 sub-images...wise.
by rohitkrishna
2011-12-06T18:26:29-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17655

Re: Accessing Pixel

PixelGetNextIteratorRow sets that variable to the number of pixelwands that it returns. In this case I only asked for one pixel and it's in the middle of the image so it can't return zero. In the general case though you would have to check the value of x after calling PixelGetNextIteratorRow to mak...
by rohitkrishna
2011-12-03T13:15:25-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17655

Re: Accessing Pixel

This code reads the built-in logo: image and changes the pixel at 200,100 to red. [EDIT] I've modified the code to use Region Iterator, as in my original version, or to use a DrawingWand as suggested by Anthony. Pete // Change the colour of one pixel in the logo: image // using either DrawPoint or ...
by rohitkrishna
2011-12-03T12:58:23-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17655

Re: Accessing Pixel

anthony wrote:Perhaps it should be included in IM sources as a basic example demo.
I think you should....it definetly helps a lot of people...
by rohitkrishna
2011-11-29T16:28:15-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17655

Re: Accessing Pixel

Thank you very much el_supremo This code reads the built-in logo: image and changes the pixel at 200,100 to red. [EDIT] I've modified the code to use Region Iterator, as in my original version, or to use a DrawingWand as suggested by Anthony. Pete // Change the colour of one pixel in the logo: image...
by rohitkrishna
2011-11-29T10:16:50-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17655

Accessing Pixel

Hi everyone,

Is there any way with which i can directly access a pixel at a given x,y position in magickwand and change the color of that particular pixel to red.
by rohitkrishna
2011-11-22T14:31:59-07:00
Forum: Users
Topic: Manipulate Image
Replies: 6
Views: 11000

Re: Manipulate Image

Here is a simple unix bash script that will create a 1D horizontal gradient and put 3 different rgb colors at different locations as specified from a text file. Save the following as a file called whatever you want. I used test_changecolor #!/bin/bash # define file of colors and positions infile=&q...
by rohitkrishna
2011-11-22T10:14:22-07:00
Forum: Users
Topic: Manipulate Image
Replies: 6
Views: 11000

Re: Manipulate Image

fmw42 wrote:A shell script will allow you to program the changes using the IM command line commands
Thankyou..can u provide an example please..iam novoice in shell scripting.
by rohitkrishna
2011-11-21T22:17:02-07:00
Forum: Users
Topic: Change Pixel color
Replies: 1
Views: 3593

Change Pixel color

Hi everyone...

I want to change the color of pixel at given x,y position in the image. i want to change all 3 r,g,b values. Can anyone please explain how can i do this in C language with Imagemagick...

Thanks in advance.
by rohitkrishna
2011-11-21T22:14:33-07:00
Forum: Users
Topic: Manipulate Image
Replies: 6
Views: 11000

Re: Manipulate Image

I presume you have a 1D image of RGB values in some standard format such as gif or tiff or png, etc. And you want to replace some pixels with different colors at specific locations. There are several approaches. The easiest or most efficient may be to just draw those colored pixels at the locations...