-
Jun 10th, 2009, 04:20 PM
#1
Thread Starter
New Member
[RESOLVED] Color and Files
Am writing a graphics program which will develop components and save them to files for later retrieval.
Cant Figure out how to save the color component of the graphics to the file.
The File seems to accept only string items and I have not been able to figure out how to convert the color string back to a color object.
Anybody know the answer?
-
Jun 10th, 2009, 04:29 PM
#2
Re: Color and Files
Look at the Color.ToARGB and Color.FromARGB methods.
The first gives you an integer describing a color(structure), the second returns a color from an integer.
-
Jun 10th, 2009, 04:31 PM
#3
Re: Color and Files
There are probably a million answers. What does 'the file' refer to? You can write anything you like to a file: string or binary data. Then there's serialization. Or you can custom write a format you like with functions to convert to and from that format.
Perhaps showing what technique (i.e. a bit of code) you are using to save this data to 'the file' may help.
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Jun 10th, 2009, 05:35 PM
#4
Re: Color and Files
Are you looking for the Color.FromName() function?
-
Jun 12th, 2009, 07:30 PM
#5
Thread Starter
New Member
Re: [RESOLVED] Color and Files
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|