It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Graphic Photoshop Forum

create an greyscale image with code

Join this free Photoshop forum and learn from all out other members.

create an greyscale image with code

Postby disenografica on Fri Mar 04, 2011 3:01 pm

Hi everyone!

I need to create on image to c hane colours by code of computer.
I have one sample image but unkonwed the method for attached here.
Pleased I will grateful a little of help
Thanks a lot
Rose
disenografica
 
Posts: 8
Joined: Fri Mar 04, 2011 2:41 pm

Re: create an greyscale image with code

Postby jerryb on Fri Mar 04, 2011 3:53 pm

hi,
1. i don't see no image.... can you upload a image to your favorite file share site and provide a url link to the image?/ if you don't have file share site ... use this one it simple/free/no registration required.... http://www.pixentral.com/

2. not quite sure what your after "using code" don't quite understand..

now if you have color image that you want in grey scale.. different ways to do that..
a. go into your image>adjustment>desaturate
b. or you can use your hue and saturation ...
c. or with newer versions of ps , you can use your black and white layer ....

and there other ways..
jerryb
1000+ Club
 
Posts: 1560
Joined: Wed Apr 16, 2008 2:57 pm

Re: create an greyscale image with code

Postby disenografica on Mon Mar 07, 2011 10:48 am

I have jut uploaded this image. http://rosailustradora.blogspot.com
i wish clear my question with its.
Thanks.
disenografica
 
Posts: 8
Joined: Fri Mar 04, 2011 2:41 pm

Re: create an greyscale image with code

Postby jerryb on Mon Mar 07, 2011 3:16 pm

hi,
oh.... ok... i have to do some running this morning.... but when i come back work on it some more..

basically seems like you want something like a half tone effect or a cross hatch effect ... something like you sometimes see in news paper especially the opinion section and there drawings..

not a good tutorial on half tone... get the idea...
http://www.tutorialized.com/view/tutori ... Look/13555
jerryb
1000+ Club
 
Posts: 1560
Joined: Wed Apr 16, 2008 2:57 pm

Re: create an greyscale image with code

Postby jerryb on Mon Mar 07, 2011 8:32 pm

hi again,,
did a little more research for you..

like i mentioned you could use the halftone or cross hatch effect

however... looking at the image..... maybe interested in the ascii effect...

now this is a simple tutorial
http://sites.google.com/site/englishpho ... l-tutorial

now you can do it photoshop.... however there even programs specifically designed to covert image to ascii art...... http://photoshopcall.com/software/tutor ... -effect/3/

some of it free and some shareware... depending on workflow make your initial image ascii and then import it into photoshop or find a photoshop ascii plug in... thing about te specific plugin you can easily designate what character to use...
jerryb
1000+ Club
 
Posts: 1560
Joined: Wed Apr 16, 2008 2:57 pm

Re: create an greyscale image with code

Postby waitely on Tue Mar 08, 2011 10:37 am

function grayscale(image, bPlaceImage)
{
var myCanvas=document.createElement("canvas");
var myCanvasContext=myCanvas.getContext("2d");

var imgWidth=image.width;
var imgHeight=image.height;
// You'll get some string error if you fail to specify the dimensions
myCanvas.width= imgWidth;
myCanvas.height=imgHeight;
// alert(imgWidth);
myCanvasContext.drawImage(image,0,0);

// This function cannot be called if the image is not rom the same domain.
// You'll get security error if you do.
var imageData=myCanvasContext.getImageData(0,0, imgWidth, imgHeight);

// This loop gets every pixels on the image and
for (j=0; j<imageData.height; i++)
{
for (i=0; i<imageData.width; j++)
{
var index=(i*4)*imageData.width+(j*4);
var red=imageData.data[index];
var green=imageData.data[index+1];
var blue=imageData.data[index+2];
var alpha=imageData.data[index+3];
var average=(red+green+blue)/3;
imageData.data[index]=average;
imageData.data[index+1]=average;
imageData.data[index+2]=average;
imageData.data[index+3]=alpha;
}
}

if (bPlaceImage)
{
var myDiv=document.createElement("div");
myDiv.appendChild(myCanvas);
image.parentNode.appendChild(myCanvas);
}
return myCanvas.toDataURL();
}

web designers
waitely
 
Posts: 8
Joined: Tue Jan 18, 2011 11:29 am

Re: create an greyscale image with code

Postby disenografica on Thu Mar 10, 2011 4:11 pm

Thanks alot for your helpful.
One last doubt.
Where could I get Ascii filter by photoshop?
kind regards
disenografica
 
Posts: 8
Joined: Fri Mar 04, 2011 2:41 pm

Re: create an greyscale image with code

Postby jerryb on Thu Mar 10, 2011 5:18 pm

hi,
first i have no personal recommendations....

now there a lot of asii art plugins.... freeware and shareware... how good they are.. i can't for the most part the better one are the shareware....

certain things to look for is is if they give you control over the size of the characters and how good it is in handling the shaded areas so that you can get those nice shaded details.....

now came across this one
http://www.xoyosoft.com/mas/index.htm
i saw others and wasn't impressed with them ... some the adds that showed up also i didn't get chance to look at those...

in my search i came a cross this tutorial ... now it it uses 1 and 0 but you could use any character .... and infact create a action... will help reduce repittition or even create a brush... anyway ...
http://www.ephotozine.com/article/creat ... ique-11851
jerryb
1000+ Club
 
Posts: 1560
Joined: Wed Apr 16, 2008 2:57 pm

Re: ASCII BY PHOTOSHOP IN MAC

Postby disenografica on Fri Mar 18, 2011 6:21 am

HI

One detail about my question. I proof recomenndations with succesful... in PC. Do you know anything similar by Mac?
Tk!!!
disenografica
 
Posts: 8
Joined: Fri Mar 04, 2011 2:41 pm

Re: create an greyscale image with code

Postby jerryb on Fri Mar 18, 2011 2:19 pm

hi,
i don't... however there is ascii software avail for the mac... what program would be attractive to you.. as you found there a lot of ascii software but a lot of it you didn't like... so it take alittle time to go thru them and see witch might work best and meet your needs..

now did a little searching... came up these results...... there seems to be quite a bit...
http://www.bing.com/search?q=ascii+art+ ... E&qs=n&sk=
jerryb
1000+ Club
 
Posts: 1560
Joined: Wed Apr 16, 2008 2:57 pm

Next

Who is online

Users browsing this forum: No registered users and 1 guest