473,700 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

During crossfade, page background intrudes

I found a script to crossfade between two images that works
okay except that in the middle of a fade when both images
have equal opacity, the combined images also are tinted
by the page background color. Evidently the images are
alpha-composited not only with each other, but by default with
the background as well, creating an effect I definitely
do not want. I demonstrate this at
http://cpacker.org/afader
in which I use a blue background to make the effect obvious.
As far as I can tell, nothing in the script
http://cpacker.org/afader/xfade2.js
is doing this explicitly and so I don't know at what level this
rogue compositing is being done or whether I can gain
control over it in Javascript at all. Any ideas would be
appreciated.

--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacke r.org
Jul 29 '08 #1
4 1527
On Jul 29, 3:01*pm, Charles Packer <mail...@cpacke r.orgwrote:
I found a script to crossfade between two images that works
okay except that in the middle of a fade when both images
have equal opacity, the combined images also are tinted
by the page background color. Evidently the images are
alpha-composited not only with each other, but by default with
the background as well, creating an effect I definitely
do not want. *I demonstrate this athttp://cpacker.org/afader
in which I use a blue background to make the effect obvious.
As far as I can tell, nothing in the scripthttp://cpacker.org/afader/xfade2.js
is doing this explicitly and so I don't know at what level this
rogue compositing is being done or whether I can gain
control over it in Javascript at all. Any ideas would be
appreciated.
An opacity of less than one means that the image is somewhat
transparent, so there's no way to avoid seeing the background through.
But you probably ought to set up the target image below the current
image (and with opacity= 1.0), and fade just the current image from
opacity= 1.0 to opacity= 0.0.

--Jorge.
Jul 29 '08 #2
On Jul 29, 7:16*pm, Jorge <jo...@jorgecha morro.comwrote:
On Jul 29, 3:01*pm, Charles Packer <mail...@cpacke r.orgwrote:
I found a script to crossfade between two images that works
okay except that in the middle of a fade when both images
have equal opacity, the combined images also are tinted
by the page background color. Evidently the images are
alpha-composited not only with each other, but by default with
the background as well, creating an effect I definitely
do not want. *I demonstrate this athttp://cpacker.org/afader
in which I use a blue background to make the effect obvious.
As far as I can tell, nothing in the scripthttp://cpacker.org/afader/xfade2.js
is doing this explicitly and so I don't know at what level this
rogue compositing is being done or whether I can gain
control over it in Javascript at all. Any ideas would be
appreciated.

An opacity of less than one means that the image is somewhat
transparent, so there's no way to avoid seeing through it.
But you probably ought to set up the target image below the current
image (and with opacity= 1.0), and fade just the current image from
opacity= 1.0 to opacity= 0.0.
A demo : http://preview.tinyurl.com/5exjxk

--Jorge.
Jul 29 '08 #3
On Jul 29, 9:01*am, Charles Packer <mail...@cpacke r.orgwrote:
I found a script to crossfade between two images that works
okay except that in the middle of a fade when both images
have equal opacity, the combined images also are tinted
by the page background color. Evidently the images are
Lousy script, which is typical of scripts you find floating around the
Internet.

The setOpacity function has the old FF blink fix in it:

function setOpacity(obj) {
if(obj.xOpacity >.99) {
obj.xOpacity = .99;
return;
}
obj.style.opaci ty = obj.xOpacity;
obj.style.MozOp acity = obj.xOpacity;
obj.style.filte r = "alpha(opacity= " + (obj.xOpacity*1 00) + ")";
}

That first if clause looks suspiciously like the old FF blink fix.
Perhaps that is the problem. Search the group for a better setOpacity
function.
Jul 29 '08 #4


Jorge wrote:
On Jul 29, 7:16�pm, Jorge <jo...@jorgecha morro.comwrote:
An opacity of less than one means that the image is somewhat
transparent, so there's no way to avoid seeing through it.
But you probably ought to set up the target image below the current
image (and with opacity= 1.0), and fade just the current image from
opacity= 1.0 to opacity= 0.0.

A demo : http://preview.tinyurl.com/5exjxk

Ahh! I understand now. Thanks very much.

--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacke r.org
Jul 30 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3979
by: rob | last post by:
Hi All, I have an asp script which updates upto 300000 records each time it is run. I would like to have a textbox which says records progressed : then in increments of 100 or 1000 whilst the script is running. Is this possible to do with a textbox? I've tried using the response.flush with a variable which kinda works but it displays as follows; 1000 2000 3000
4
5348
by: erik | last post by:
Is it posssible to inherit the previous pages (parent pages) background image? Is there a script out there I could look at? Thanks
4
3949
by: Els | last post by:
Hi, I would like an opinion on the following: I have a page which is made up of background-images with transparent linked images in front of it, which on hover show text in CSS popups. Due to appropriate alt text, anyone viewing the page with images turned off, will see the alt text instead, and on hover will see the popups.
1
1737
by: admin | last post by:
Hi all, I wrote a small text editor (using a JTextPane) in order to ease the use of a CMS, in a more WYSIWYG way. Basically, you can see directly the effect of setting the background color, the text color, bold/italic/underlined styles and so on... You can have several applet on one page as there is one applet per column and per language.
7
5125
by: Nilesh | last post by:
I am using background-image attribute in a CSS file and linking the CSS file to aspx page. But strangly, background-image attribute is not working for relative URL. e.g. If I apply following css ..navbar-background { background-image: url(images/menubar.gif); } the image is not appearing on the page. It seems that IE is picking
6
4886
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
0
1052
by: RKM | last post by:
Hi All Following error is coming in particular web application during loading / login process. background----- we have 3 ip segment 172.26.1.x 172.26.2.x 172.26.3.x.
1
2173
by: soluvah | last post by:
Hello Folks, Been trying to widen my site's body from "779" to "1000" so it almost fills the window. IE 7 on windows XP just dismantles the pages and leaves wide gaps between the left column and the body with no change in size to the body width. FF is doing it right. Please let me know if this problem can be fixed, I am at my wit's end. I will also send more code if needs be. I have lots of other code but I will copy and paste the one I...
2
1998
crabpot8
by: crabpot8 | last post by:
I am working on a message system that will let out programmers easily output a message to any user. It works fine, unless the message is requested inside of a page_load on an aspx page. Then, it does not render at all. The code does step through, and the control is added - I believe it might be being added to late in the page lifecycle to get rendered. I can't seem to find any way to tell .NET to render that control, however. ...
0
8731
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8649
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9081
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7819
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4660
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2032
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.