I have a map of Europe, and what I want to do is have each country of a colour depending of some variables. I display them correctly as separate .gif's, but I'd like to create a unique gif so it can be downloaded as 1 image.
Is it possible to do with ASP?
Thank you very much :)
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8626&lngWId=4
I wrote that back in 2003, it'll do what you're asking with some tweaks, but I haven't touched ASP in at least 5 years :)
The idea is that the script opens a gif, reads out the color palette and re-writes it. It's currently configured to "adjust" the palette's HSL so that you can get different colored images (e.g. you could adjust a green image to blue or red), but you could just as easily selectively replace individual colors with whatever you want.
The idea then would that you would make each country it's own specific color and then replace that color with whatever you wanted later. As long as there are <= 256 total colors, you should be fine.
If you want something more complicated, try looking into imagemagick
There is nothing within ASP to do what you want. You would need some third party component to perform this type of task.
Related
I'm really new to HTML and I'm trying to make a small website for my art.
I was wondering if it's possible to have my background choose randomly from a set of GIFs for each tile and after one loop to randomly select another GIF. I'm specifically trying to have a unique GIF for each tile and wasn't sure how to even go about doing this since I only know how to make one GIF repeat across the entire background.
In case what I'm asking doesn't make sense, I'm attempting to have the background of my website look like the floor of an arcade. I didn't want to be the same few squiggles and shapes in a repeated pattern and thought it would be cool if instead each one changed into a separate squiggle/shape after a few seconds.
Thank you if you can help and sorry if this sounds at all silly or anything.
I tried looking into this elsewhere and just couldn't find anything I understood, so I thought to ask here.
I am using Sikulix for UI testing, the problem is that when ever there are changes in UI I need to replace all the images which got changed using the IDE and I need to again describe the actions ( accuracy, click position) which is becoming a sort of overhead in my case. Is there any work around by which I can simply replace the new UI images in the project folder with the same old name ( It wont work directly as the new coordinates might be different + the new image should be of same resolution that of older one)
PS: I have completely understood that sikuli works at pixel level, but still curious to find out if any one has found a work around.
Unfortunately, you will need to recreate the images. What could make it a bit easier, is if you had more descriptive names than the ones generated by Sikuli IDE automatically. Keep in mind these are just image files stored on your PC. If you have names like button1.png, button1.png, etc.., it will make your life easier.
This may or may not work for you depending on your project development:
In my case, the changes that occur at times reduces the image similarity from say 0.9 defined to ~0.7. Now, rather than going ahead to replace the image with a totally new image where i would have to manipulate the offsets as well now, I capture the same region image at 0.7 similarity and replace it. You can easily create a script for this and even integrate it into your project. Use find to figure out the matching region and capture to take the screenshot of the area. The image caught using this way will now again match at 100% for you also, you have rid yourself from the headache of adjusting the targetoffset. Hope this helps.
Is there a possibility to make image colors exactly the same as HTML colors?
I have a rounded corners box, the corners are images and the background color is HTML, on my laptop it looks flawless, but on good monitors a difference in colors is noticeable.
Is it true that it isn't possible to have HTML generated colors exactly match image colors?
edit: I am using Photoshop and am using the exact hex equivalent of the RGB colors.
Another potential solution: you're seeing a color shift caused by color profiles.
These could be due to how those other monitors are configured (you can update your machine to use a specific profile; folks like designers will do this to make sure colors are accurate in photography or print design) or due to how your images are saved when exporting them from your favorite image editing tool (I'm looking at you, Photoshop). These issues can and will occur regardless of whether or not your hex colors are spot on and are ridiculously frustrating.
Give that link a shot; if you're dealing with an embedded color profile issue, that might get you going in the right direction.
Edit: That you're exporting from Photoshop makes me think this is the likely culprit.
If you use the same colors, e.g. #E1E1E1 in your CSS and your image (a tool like 'GIMP' will assist you with a color picker where you can directly enter these hex values) the colors will be identical.
My guess is your problem is most likely compression (by saving as .jpg and the artifacts it introduces). Use other formats (like the lossless PNG format) or save your JPG in a lossless way (with the quality slider up to 100 in most tools).
Browsers / monitors can look a tiny bit different for some colors. Matching up certain colors may prove to be a difficult task even if you are matching an image with the same hex value as the one you are using in your css. (this will work for most cases but not always) My recommendation is to use web safe colors where possible, these colors tend to render the same on multiple displays.
So I just got an internship at this company, and as a side project, they want me to redesign one of their webpages. On their webpage, they have an image like the following:
Basically, this is an image of a room layout, with different server boxes (white squares) used for testing. When you click on one of the white boxes, it will hyperlink you to a page that has to do with that server box and so forth. The issue is that if they redesign the room, or add server boxes etc, they need to remake a new image, and then change quite a bit of coordinates in a badly written perl script. (I thought this was a bad way to do things, and I recommended trashing the entire image idea in the first place, but they wanted to keep it). Anyway, is there an easier way to do this with code, so that if changes need to be changed, it only involves adding/subtracting lines of code? I was thinking of using some sort of html/css combination, but I don't know if there is a better way to go about doing this... I want to make there diagram a bit more dynamic.
Thank you.
Image Magick is often installed on web servers. Have a look at http://www.imagemagick.org/script/perl-magick.php
I have to change the color of the particular part of an image dynamically without affecting the image design. Any idea how to do this?
I want to change the color like this
http://www.bmw.com/com/en/newvehicles/3series/sedan/2008/visualizer.html
Thanks in advance.
In example you provided there is no color manipulation on the picture. Every time you change the color — new .swf asset with car loaded into the app(example). in my opinion that's the easiest way to solve problem like this.
On other hand, if you really want to manipulate color channels of particular image, the ColorMatrix Class by Quasimondo is in my opinion the best tool to do this. The tricky(hardest, maybe in some cases impossible) part here will be to select particular part of the picture were you need to convert colors.
Update
the idea is that, you load your app, withh .swf asset only for the default color, and when user choose any other color you simply download additional .swf asset.
As for the second approach with color manipulation, I'm thinking, if you need this only for already predefined pictures, that you can cut out part of your picture which you want to manipulate, and convert it to .png with transparent background, and put it on top of your original picture. So you will have something that looks like original pic, but in reality it's to separated layers: one is your unchangeable part of the image, and other is the part that you want to manipulate. Here is the example with unicorns(because everybody love unicorns):
Now you can use ColorMatrix to manipulate color channels of unicorn, and all other parts of your picture will be unchangeable.