Gradient background from image for XAML.
-
Hi, Is there any way to find out gradient colors and stops from image? I have mockups of screen from my user experience guy. From those i want to find out gradient stops (points) and colors he used. currently I am using Paint.net and expressing blend and getting the colors creating them in XAML for the same. GradientStops are the biggest challenge. Thanks
-
Hi, Is there any way to find out gradient colors and stops from image? I have mockups of screen from my user experience guy. From those i want to find out gradient stops (points) and colors he used. currently I am using Paint.net and expressing blend and getting the colors creating them in XAML for the same. GradientStops are the biggest challenge. Thanks
I don't think there is any tool to infer gradient information from an image. This seems like it could get rather complicated. What you might be able to do is create a differential image. You can create an image where each pixel represents the maximum difference in color between that pixel and the pixels neighboring it in the source image. That way, you can have a visualization of the changes in color, rather than just a visual of the colors. That should help you identify exactly where changes to changes (i.e., gradient stops) occur in the image. You could go a step further and make another image that is a differential image of the differential image. This will allow you to see changes in changes in changes (that may be useful for visualizing polynomial gradients that change into different polynomial gradients). But you'd have to build that tool yourself (unless anybody knows of a tool that can do that). I'd say just eyeball it or have your user experience guy use Expression Blend so you can see the actual XAML that creates the image.
-
I don't think there is any tool to infer gradient information from an image. This seems like it could get rather complicated. What you might be able to do is create a differential image. You can create an image where each pixel represents the maximum difference in color between that pixel and the pixels neighboring it in the source image. That way, you can have a visualization of the changes in color, rather than just a visual of the colors. That should help you identify exactly where changes to changes (i.e., gradient stops) occur in the image. You could go a step further and make another image that is a differential image of the differential image. This will allow you to see changes in changes in changes (that may be useful for visualizing polynomial gradients that change into different polynomial gradients). But you'd have to build that tool yourself (unless anybody knows of a tool that can do that). I'd say just eyeball it or have your user experience guy use Expression Blend so you can see the actual XAML that creates the image.
Thanks. Yes, using expression blend by user experience was one of the options we explored, but he is not that familiar with it and he is the only one in team and using EB is time consuming.
-
Hi, Is there any way to find out gradient colors and stops from image? I have mockups of screen from my user experience guy. From those i want to find out gradient stops (points) and colors he used. currently I am using Paint.net and expressing blend and getting the colors creating them in XAML for the same. GradientStops are the biggest challenge. Thanks
What tool is he using to mockup the screens? If he's using something like Photoshop, there is a XAML converter available - take a look here[^] for details.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
What tool is he using to mockup the screens? If he's using something like Photoshop, there is a XAML converter available - take a look here[^] for details.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Thanks for the suggestion and yes he is using Photoshop. I will try using the tool you pointed to.