»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 01-13-2004, 07:06 PM   #1 (permalink)
Registered User
 
Join Date: Jan 2004
Posts: 3
sgough is on a distinguished road
I need to create an image and set it's color pixel by pixel

Okay, as the title states, I want to be able to create an image and set it's color pixel by pixel. To do this I guess I'll need to be able to create an array of pixels, set each to its correct color and then output them to an image.

The problem is I have no idea what language I should use to code this. I have been stuck on this problem for days and really need help.

Any help that you could give would be much appreciated.

sgough is offline   Reply With Quote
Old 01-14-2004, 09:13 PM   #2 (permalink)
Registered User
 
OuTpaTienT's Avatar
 
Join Date: Oct 2001
Location: Bay Area, CA USA
Posts: 6,966
OuTpaTienT is on a distinguished road
Send a message via ICQ to OuTpaTienT
I don't really understand what you're asking. It's impossible to set the color information of an image pixel by pixel. Or at least impossible within all reasonable means. A 640 x 480 image has over 300,000 pixels. It'd take you a year to set the color information for each one.

Maybe if you could explain exactly what it is you're trying to do we could figure out a way to help you.
OuTpaTienT is offline   Reply With Quote
Old 01-14-2004, 09:34 PM   #3 (permalink)
Registered User
 
MitaDC's Avatar
 
Join Date: Aug 2003
Location: Coeur D' Alene,Idaho
Posts: 1,426
MitaDC is on a distinguished road
OuTpaTienT I'd like to see u do this....for me lol....jk...that would take a hell of a long time...
__________________
http://www.speakeasy.org/~blakbas/Mitatron.JPG
MitaDC is offline   Reply With Quote
Old 01-14-2004, 10:37 PM   #4 (permalink)
Registered User
 
Creatures's Avatar
 
Join Date: Jul 2002
Location: Switzerland
Posts: 3,962
Creatures is on a distinguished road
Send a message via ICQ to Creatures
i'm sure he doesnt mean a 640 x 480 or even a 1800 x 1600 (lol), i think he means a smaller one, but the problem is you probably cant see it.

or you use a different size for a "pixel", as in old dos games the "pixels" are giant and it doesnt take that long to fill a screen!

but to be honest i still dont see what you want

Creatures
__________________
___)
(
____)REATURES
Creatures is offline   Reply With Quote
Old 01-14-2004, 11:03 PM   #5 (permalink)
Registered User
 
Dax_Brandy's Avatar
 
Join Date: Oct 2001
Location: Manila, Phil
Posts: 1,258
Dax_Brandy is on a distinguished road
Send a message via Yahoo to Dax_Brandy
i just cant imagine doing that. you can start from a big image then edit it pixel by pixel. imo.
Dax_Brandy is offline   Reply With Quote
Old 01-15-2004, 01:08 PM   #6 (permalink)
Registered User
 
Join Date: Jan 2004
Posts: 3
sgough is on a distinguished road
Okay, what I need to be able to do is create a system that displays an image of a car and allows the user to change its colour by clicking a button. The problem is this isn't a simple "change the colour of the car" problem becuase of shading etc. I need to be able to let each pixel display a different amount of colour depending on it's position. Actually I could probably colour them in groups.

Anyway, I have a colour mask, a greyscale image of the car and an algorithm that calculates the correct colour of the pixel.

I thought I had a way of doing this in PHP but after reading your replies am concerned it will take too long to execute.

Any other ideas on how this could be achieved?
sgough is offline   Reply With Quote
Old 01-15-2004, 01:36 PM   #7 (permalink)
Registered User
 
Creatures's Avatar
 
Join Date: Jul 2002
Location: Switzerland
Posts: 3,962
Creatures is on a distinguished road
Send a message via ICQ to Creatures
ok you need a semi transparent (or however you call it) pic and then changing the background (behind the pic) with a small javascript.

it's quite simple, you need to cut out the car and put it on a different layer, then desturate it ( CTRL + D i think, in Photoshop) then use the Gradient map and make the white parts invisible and the black parts, non visible, save as transperent pic (gif or whatever you like)

program a small javascript where you selecte the BG color behind the car, et voilą

i never tried it, but it would be awsome if it works

i'll give it tomorrow a try, but maybe out's already working on it, with a better way!

would work with flash too (other than javascript) but that would take more time! (for me)

Creatures
__________________
___)
(
____)REATURES
Creatures is offline   Reply With Quote
Old 01-15-2004, 02:32 PM   #8 (permalink)
Registered User
 
Join Date: Jan 2004
Posts: 3
sgough is on a distinguished road
Wow! that sounds much easier. I'm not entirely sure what you mean by the gradient map and making the white parts invisible though. Would it be possible to go into a bit more detail. If it is possible to use Flash, that would be ideal as I've done the rest of the system in Flash also.

Thanks for all your help. I've been struggling with this for days and you guys on this forum have by far been the most helpful.
sgough is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 07:16 AM.