Problem with Writing the new image
Posted: 2010-07-15T13:30:06-07:00
I have a question that I thought maybe someone might know what was going on. I created a program through Perl that allows a user to start with a background image and add shapes...text...icons...arrows and lines to the background image.
I have run into one problem and cant seem to determine what is wrong. The background map is a map of counties in my jobs area of responsibility. One of the ways people use it is to shade counties they want to stick out. I do this by doing a FloodFill with the color they chose until it hits white (county boundaries). This works great...but for some reason if someone draws a white line through counties to get down on a smaller scale and then shades...the entire image becomes that color. This happens about 50% of the time. Sometimes it works the way intended and sometimes not. The only thing I can think of is when you draw the line and write the new file it skews the color slightly so when you try to shade it never hits the white for it to stop shading.
Does this make sense? This was my first program with ImageMagick and Im not that great of a programmer, but everything else works brilliantly.
Thanks for the help.
I have run into one problem and cant seem to determine what is wrong. The background map is a map of counties in my jobs area of responsibility. One of the ways people use it is to shade counties they want to stick out. I do this by doing a FloodFill with the color they chose until it hits white (county boundaries). This works great...but for some reason if someone draws a white line through counties to get down on a smaller scale and then shades...the entire image becomes that color. This happens about 50% of the time. Sometimes it works the way intended and sometimes not. The only thing I can think of is when you draw the line and write the new file it skews the color slightly so when you try to shade it never hits the white for it to stop shading.
Does this make sense? This was my first program with ImageMagick and Im not that great of a programmer, but everything else works brilliantly.
Thanks for the help.