Fading dynamic PNGs in IE 8 with jQuery - internet-explorer-8

I've found a number of posts about hacks for fixing IE8's PNG problem, but I can't seem to adapt any of them to my scenario.
I have four PNGs that are generated dynamically using $.load(). They fade in and out, and then another four PNGs are generated and do the same thing.
In IE8 the semi-transparent parts of the images have black backgrounds.
Is there a way I could run an alpha filter on individual PNGs when they are loaded instead of upfront when the DOM is ready?
Any other suggestions?
Thanks!

You need to use the AlphaImageLoader filter (not <img src="..." />) to display the image.
Even in IE 8, this is necessary to get the filters to play together.

Related

Image with parameters renders with reddish overlay

I have an Umbraco 10 site where I use a grid and insert images into the grid. The images are rendering with parameters eg.
/media/tavndatn/d58553_5475de341c9344b7ad65acb40ac06b5a_mv2.jpg?rmode=max&width=136&height=143
The problem is that without parameters the image looks ok, however with the parameters it renders with a red overlay. I have no idea why and where it comes from.
Even when displaying the image link directly in the browser - it always renders with the red overlay.
Any suggestions?
Why the images are rendering with parameters in the first place and how to remove the overlay? There doesn't seem to be any particular style assigned to the images, no background, no other attributes.
The images display ok here as you can see above - first have the parameters and the second does not have any.
It seems to affect jpg images for now, gif & png display ok.
I have upgraded to Umbraco 10.2.0 and the problem has gone. Apparently there was issue with Image Sharp in version 10.0.0

Why is Firefox displaying svg images wrong?

I encountered a weird Firefox's behaviour. It renders SVG images cutting parts of them or not displaying them at all, but only certain of images, not all of them. Chrome and IE are displaying them properly. Here is a link to the website I put said images on:
funjo.pl
Images which are not being displayed properly are logo in top menu bar and big blue logo with transparency on the big very top banner. The funny thing is that two icons a bit down on the same page (three rolls and woman's legs), which are also SVGs are being displayed properly. Could someone please tell me what's going on? I suppose there is something wrong with SVG image code itself but I can't detect what exactly.
I'm not pasting whole images' code beacuse it's too much of it. You can download these images from http://funjo.pl/media/2016/06/logo.svg and http://funjo.pl/media/2016/06/logo2.svg.
PS: If you really want me very badly to paste the whole code let me know.
PS2: I created all of SVGs on the website using Corel X7, if this information helps in anything.
PS3: I'm using the newest FF v 46.0.1.
Actually I've found a solution myself, it helped perfectly but required few more steps after exporting SVG in Corel X7 (as I mentioned in my post above there were two images, one of them with transparency). So here are the steps I made to make it being displayed properly in FF (a bit trial and error procedure but works):
I exported both SVGs again removing transparency from the one which was originally transparent, so no transparency at all in both SVG images. The one used as logo in menu bar contained all the elements grouped (logo and text were both separate but grouped), I ungrouped those elements and made them as one.
I removed height and width attributes from both SVGs.
I added preserveAspectRatio="none" attribute so I could manage width and height of the image separately, just like raster images (this CSS Tricks article helps a lot with understanting the whole resizing process).
I used SVG Optimiser tool to remove all the unnecessary bits from my images and to slim them down a little.
I downloaded optimised SVGs from above mentioned tool's website, uploaded them to my website's FTP.
I added height:(some)px and width:auto attributes in CSS
I added transparency for the one which was supposed to be transparent via CSS - opacity:0.7 in this case.
Refreshed the website and voilĂ , it works like a charm. Hope it will help someone with the similar problem as mine.
EDIT
Here are images to compare, working one and not working one.
PS: After some more trials and errors I found out that changing standard text to curves in Corel X7 makes FF render the SVG image properly without above steps, but it doesn't change the fact that it worked properly in Chrome and IE anyway even if the text wasn't changed to curves before export. Plus FF didn't display SVG exported with transparency at all and Chrome and IE did.
You could open a working and failing SVG file into your text editor and find differences in the generated HTML.
I guess there is a difference the way you save it or how the vectors and layers are put. Maybe some transparent layer on top off the image renders strange?
Applying a width of 300px or above gave me the correct results as in chrome and IE.
So just give a width as below and probably you can adjust the width as per your requirement.
Hope it helps.
<img style="width: 300px;" src="http://funjo.pl/media/2016/06/logo.svg" alt="Funjo">
I solved it by removing commas , by spaces

IE 10 & PNG Files As Background Image

We have a sprite of many icons which is 10564px x 80px. The icons are arranged horizontally.
In every other browser except IE10 the icons/images show up when being used as background images for tags with specific CSS to apply the relevant position.
When viewed in IE10 they do not show up at all and actually when you try to view the png file directly from the URL in IE10 it doesn't show either.
Any ideas?
After extensive testing, it turns out it's a limitation on the width of the PNG canvas and IE10.
PNG images would work and can be viewed right up until 8000px wide but no more than that, after that they just don't render.
After more testing it's related to whether or not they are transparent. PNGs with transparency just don't show at all whereas images without transparency show as a black block (canvas).
Whether or not MS will fix this remains to be seen... we live in hope!
The fix for us is to reduce the width of our sprite to 8000px and have two or more rows of icons/images well spaced out.
The fixes is only to separate the each individual image as single with minimum size, which will be less than 8000px wide;

Website looks wrong in Google Chrome

I have this website: hrrubin.dk
In chrome, you will notice that all images that have image switch on mouseover, are positioned wrong. This has flaw happened only recently. Maybe a cause of some changes to the chrome code.
Is the solution to make a chrome hack, so not to disturb the the rest of the browsers?
I think there's a better way to do it. You put all of those images in a sprite, and apply them as a background image to the a tag. Give distinct IDs to each a tag. Then use background positions to position them and to change them on hover. That's how its generally done.

-moz-border-radious does not work on images in firefox ... why? (related to css3)

-moz-border-radious does not work on image element (mean in html) in firefox ... why? (related to css3)
i test some way for solving that such as make a container for that image and changing the radious of container / not help !
thanks for attention
best regards
Firefox 3 treats foreground images as being in front of the border. This results in the effect that you're seeing. It doesn't affect any other browsers, including Firefox 4.
The issue is discussed at length in the topic linked as a duplicate in the comments above -- Firefox -moz-border-radius won't crop out image?
The best way around it is to use background images instead of foreground images where you want to have rounded corners:
ie: <div style='background:url(myimage.jpg);' /> instead of <img src='myimage.jpg'>
The down-side of this is that background images aren't quite as flexible as foreground images -- ie its harder to scale them, etc. But it does resolve the problem.
The other options are to give the image itself rounded corners, or simply to ignore it (since it only affects Firefox 3; depends on how many of your users would be affected, and how much if affects your design).

Resources