Color manipulation

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 3
Reputation: Arctic Giraffe is an unknown quantity at this point 
Solved Threads: 0
Arctic Giraffe Arctic Giraffe is offline Offline
Newbie Poster

Color manipulation

 
0
  #1
Nov 20th, 2008
Are there any methods in C# to adjust the hue, lightness and saturation of textures?

I have a Texture2D object in which I want to gradually change the hue of every pixel in the texture by the same amount over time. Just as if I was in Paint.NET and manually sliding the hue control slider for an image.

Is there a method I can use that gives me control over this?

I'm using the XNA development framework in Visual C# Express Edition
Last edited by Arctic Giraffe; Nov 20th, 2008 at 2:42 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 58
Reputation: vckicks is an unknown quantity at this point 
Solved Threads: 9
vckicks vckicks is offline Offline
Junior Poster in Training

Re: Color manipulation

 
0
  #2
Nov 22nd, 2008
http://richnewman.wordpress.com/hslcolor-class/

perhaps that will get you started
Visual C# Kicks - Free C# code resources and articles.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 3
Reputation: Arctic Giraffe is an unknown quantity at this point 
Solved Threads: 0
Arctic Giraffe Arctic Giraffe is offline Offline
Newbie Poster

Re: Color manipulation

 
0
  #3
Nov 24th, 2008
Perhaps it will :-)

I'll give it a go - thanks for that, looks like I can manipulate HSL values in images to my hearts content with this.

Hopefully I will be able to manipulate the pixels of images around the size of 450x450 (202500 pixels) in real time. If this turns out to be too much for my laptop I'm thinking of using 'stencil' images which lie on top of a changing image of the current hue desired - pre-loading in all my desired hues to display underneath it - since all my images are mostly black with a colorful glyph displayed on them that I want to gradually change colour over time.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 16
Reputation: gbertoli3 is an unknown quantity at this point 
Solved Threads: 0
gbertoli3 gbertoli3 is offline Offline
Newbie Poster

Re: Color manipulation

 
0
  #4
Nov 26th, 2008
Originally Posted by Arctic Giraffe View Post
Are there any methods in C# to adjust the hue, lightness and saturation of textures?

I have a Texture2D object in which I want to gradually change the hue of every pixel in the texture by the same amount over time. Just as if I was in Paint.NET and manually sliding the hue control slider for an image.

Is there a method I can use that gives me control over this?

I'm using the XNA development framework in Visual C# Express Edition
Yes first you must create a bitmap of the Textures. Please View my Snippet. I have also included other methods that you might find useful.

Hope this helps
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 3
Reputation: Arctic Giraffe is an unknown quantity at this point 
Solved Threads: 0
Arctic Giraffe Arctic Giraffe is offline Offline
Newbie Poster

Re: Color manipulation

 
0
  #5
Nov 27th, 2008
Thanks very much, very useful.
Last edited by Arctic Giraffe; Nov 27th, 2008 at 9:16 am.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 16
Reputation: gbertoli3 is an unknown quantity at this point 
Solved Threads: 0
gbertoli3 gbertoli3 is offline Offline
Newbie Poster

Re: Color manipulation

 
0
  #6
Nov 27th, 2008
Glad I could Help!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC