Svg doesn't work as background - html

I made a translucent svg. It was a 50% opacity round metal texture. When I put it above any other color it makes it look like real metal. It was made using Illustrator and had 2 of its effects: Pixelate>Mezzotint>GrainyDots and Blur>RadialBlur. Then I made a Clipping Mask. Here is its link https://dl.dropbox.com/u/99185097/metalTex.svg. When I normally open it, it views correctly, but when I use it as a background in CSS3 for my HTML5 page, it doesn't open. I am sure it's not my CSS coding's fault because when I use another very simple svg as my background, it opens. I think it could be the Illustrator effects, maybe they don't view when you use it as a background. Also these effects make it of 4.46mb. Please suggest a solution. Making it a png wouldn't work because sometimes it needs to cover extremely long pages.

Please expand your vector file properly, save and then export it as svg file again and go for background. It may work now.

Related

Sikuli and Images with a Transparant background

I am trying to test things out lately with Sikuli and the use of an Image with a Transparant background.
For example with the Sikuli IDE we define:
Image_FireFox = ("FireFox.png")
Now I took that "FireFox.png" and I have adjusted it with Paint.NET to make the background transparant. And then I save it again to "FireFox.png", and I put the new .png in the map of where Sikuli orginaly placed it.
When I open the IDE again, that image appears to have a black background (and not transparant). And also the image is not recognized anymore by my Sikuli Script. If I open the image in Windows Viewer, the background is still transparant.
The idea behind it is to make the image better recognized, and then my script would not care if the background of the FireFox icon is white, red or whatever colour.
Does anyone know if there is a way that Sikuli can deal with images with a transparant background? So that finding an icon on the desktop goes better, and the background wouldn't matter anymore.
Sikuli (or should I say OpenCV core that's being used by it), does not care about the background of the image itself. What it does is just to scan the whole screen as it is, exactly as it appears to you. It is not aware of types of images or anything else, just pure visual appearance. Saying that, if your image remains unchanged since when you first created the pattern and you can uniquely detect it on the screen, that will work.
As far as I understand, this quite the opposite of what you're trying to do. Do not try to change the image background because if you do, everything that will become visible behind this image (due to transparency) will prevent Sikuli from detecting it rather than helping it. Keep in mind that Sikuli only deals with rectangular patterns, so anything which is other than rectangular image won't work.
In regards to the way it looks in IDE, I'm not sure. That might be as a result of not supporting images with transparent alpha channel. You can try and ask this question on Sikuli official forum here.
its time to add an updated answer.
as of the current state sikuli has been replaced with sikulix. and sikulix can now deal with transparent or even masked images quiet well.
see here link

Is there a way to make a specific color (white) in an image transparent for a webpage?

I want to be able to take my kingdom of loathing signature that has this code:
<img src="http://sigs.kingdomofloathing.com/player_2192849/mode_bigsig/l1_clan/l2_clantitle/s1_level/s2_class/playerfeed_2192849_bigsig.gif" border="0" />
I want to take the white background of the image and make it transparent. The reason why I can't do this in an image editor is because these signatures update every once in awhile according to what you have been doing in the game.
The simple answer is that you can't do this with CSS and HTML.
Adding transparency to the element with CSS like Frank Tudor stated (via opacity) will affect the entire image.
So really you have three options:
Edit the image using design software like Photoshop, removing the
white bg and saving it out as a trans gif or png.
Utilize CSS opacity, but this will make the entire object transparent. If you're okay with that then this is probably the easiest solution.
Use a scripting language. As others stated you can technically edit images using certain scripting languages like PHP. This will be the most time-consuming/technical way to perform this task (depending on your coding skills).
Hopefully this helps.
If the images are being updated, then it's up to whatever code you are using to dynamically create those images. You should certainly be able to use transparency when creating the images, regardless of how they are made.
I recommend PNG rather than GIF, but either would work.
Post the code of however you generate the signature images, and someone can help you update it to use a transparent background.
There are advanced manipulation functions javascript in one case I remember opacity being used for transparency and in most server-side programming languages you can find image functions.
The problem you face (without an image editor) is that transparency is parameter of the image as it is saved out (and some image types look better than others when it comes to transparency).
You could try this...
Try adding an ID or Class to your IMG tag and this bit of code.
#IDgifThing {
opacity: 0.5; /* 50% transparent */
}
I have not tested it, but I hope it helps you or at least puts your mind in the right direction.

How to mask image with gradient background?

i have images and i want to remove 2 angles of each image.
The removed part should be transparent, and this is the part i couldn't fix.
Here are 2 images the shows what i want to do:
This is an empty image. The white color is the part i want to show. The Blue part is showing the document background gradient color.
This is what should i get at the end. The blue part again, is transparent from document gradient color.
Anyone has idea?
In webkit browsers you can use mask-box-image. Put your image in a div with the image-mask class and then use mask-box-image with a transparent png
.image-mask {
-webkit-mask-box-image: url(your_mask.png);
}
There is an excellent article on the always brillient CSS Tricks website - http://css-tricks.com/webkit-image-wipes/
It's webkit only though I'm afraid.
Some may not like my non-code answer, but you could do it in the image itself? Please don't hate me for suggesting this, but sometimes code doesn't solve all.
Save the image as a PNG.
Make sure the layer you are working on is not the "background" layer, if you are in Photoshop.
Erase/use the marquis tool to delete the part of the image you want to be transparent. You can blur the edges of the marquis tool to make it "fade."
Depending on your settings in Photoshop or other editing program, the "transparent" section should be a checkered grey and white.
Save the image as a PNG and use it instead of the coded mask.
Granted, this doesn't work if you are dynamically loading images or have some other reason you are relying on code to mask your image, but it should work. Early versions of IE have some issues with PNGs, but I've not encountered it with IE9, IE8 or IE7 in my current project.

Map opaque section of image

I was wondering how one would go about automatically making an image map based on just the opaque parts of a png image. You are normally able to click anywhere on the png image, even transparent areas, and it will register as clicking the image. Is there any way to exclude transparent areas and only have opaque areas register?
I assume there is some sort of javascript color detection feature, or something along those lines. I have access to jQuery on my website, as well.
Thank you for taking time to read and answer.
Trying to do this with images will be a major headache. It's possible that there is a javascript library out there to detect colors, but that's very complex stuff.
Maybe give svg a go if the graphics are simple.
This site (not mine) has a nice map using svg.

How to generate Preload animated gif for Internet-Explorer

freakin' out because i didn't manage to create a preloader, which is working in internet explorer. it is a real small preloader (10x10px), which is shown in a textfield after the user started a search.
i first implemented a css-spinner from here: http://cssload.net/ which looks good everywhere but doesn t work in ie at all.
afterwards, i generated one animated gif at http://ajaxload.info/ , but the results are looking pretty ugly in small size. it doesn t make a difference, if the gif is transparent or not...
anyone a good idea for that?
thanks,
k
EDIT: mootools is supported, but i do not want a small flash-preloader for that case!
have you tried this one?
preloaders.net
there are many modification possibilities and it looks nice in small size as you can scale the image to the size you prefer.
implementing a gif as part of a veil component you are viewing above the component you are loading or which is processing the request will work on every browser.
thanks for all comments and infos!
i guess the problem was the transparency of the preloader. the background of the text input is grey, so with transparent gif i had white pixel at the "corners" during the animation. i just choosed the grey color as background-color from the gif, and it looks ok. thanks eyerbody!