Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2005

Tip: Looking for answers? Try searching our database.

PNG transparency in InfoPath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Terry Thibodeau - 04 Aug 2005 20:53 GMT
As you can modify the HTML output by an InfoPath view's .xsl template, I
thought I might be able to use the AlphaImageLoader filter to display png
images with transparency (as they don't render properly by simply inserting
the png image).

After thinking about it, it makes sense that this filter can't be used
probably due to security restrictions around using the filter located in an
untrusted domain.

Is there any way to get image transparencies working in InfoPath (please
don't say install IE 7.0 beta :) )?

Perhaps I could use managed code to manipulate the image??

Thanks in advance for the help.
RMack005 - 04 Aug 2005 21:13 GMT
It's probably placing the unfiltered image on top of the filtered one.  Try
using a transparent gif as the source for the IMG element and your png for
the source in the call to the filter.  You can also try applying the image
and invoking the filter via css: http://koivi.com/ie-png-transparency/

> As you can modify the HTML output by an InfoPath view's .xsl template, I
> thought I might be able to use the AlphaImageLoader filter to display png
[quoted text clipped - 11 lines]
>
> Thanks in advance for the help.
Terry Thibodeau - 04 Aug 2005 21:47 GMT
Thanks.

I probably should have specified the implementation that I was using:

I inserted a 1 x 1 pixel, transparent .gif into the InfoPath form so it
would be included into the package (.xsn). I also inserted the .png file.

I then modified the default view.xsl file to reference the images like so:

<img style="FILTER:
progid:DXImageTransform.Microsoft.AlphaImageLoader(src='BD55AF9E.png',
scalingMethod='image'); WIDTH: 60px; HEIGHT: 48px" src="B55DBEE5.gif"/>

All I get is a 60px by 48px blank image (obviously, the transparent .gif).

I tried changing the size of the blank.gif to 10px by 10px and put a solid
1px black border on the image. If the filter was working properly, I should
see a small 10x10 square with a black outline and the png image behind it.

I put the above code (with the 10px size change) into a testpng.html file in
the InfoPath project's working directory and opened in IE. Now, I got an
"Active Content" warning and had to stop the content block. When I unblocked
the content, I saw what was expected, a 10x10 square with the png image
behind it.

I'm thinking this is exactly why it isn't working in InfoPath...security
boundaries.

Now, the question is, can I circumvent this using managed code?

> It's probably placing the unfiltered image on top of the filtered one.  Try
> using a transparent gif as the source for the IMG element and your png for
[quoted text clipped - 16 lines]
> >
> > Thanks in advance for the help.
Greg Collins [InfoPath MVP] - 04 Aug 2005 23:18 GMT
It is my experience that filters/image transofrms do not work in InfoPath.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

Thanks.

I probably should have specified the implementation that I was using:

I inserted a 1 x 1 pixel, transparent .gif into the InfoPath form so it
would be included into the package (.xsn). I also inserted the .png file.

I then modified the default view.xsl file to reference the images like so:

<img style="FILTER:
progid:DXImageTransform.Microsoft.AlphaImageLoader(src='BD55AF9E.png',
scalingMethod='image'); WIDTH: 60px; HEIGHT: 48px" src="B55DBEE5.gif"/>

All I get is a 60px by 48px blank image (obviously, the transparent .gif).

I tried changing the size of the blank.gif to 10px by 10px and put a solid
1px black border on the image. If the filter was working properly, I should
see a small 10x10 square with a black outline and the png image behind it.

I put the above code (with the 10px size change) into a testpng.html file in
the InfoPath project's working directory and opened in IE. Now, I got an
"Active Content" warning and had to stop the content block. When I unblocked
the content, I saw what was expected, a 10x10 square with the png image
behind it.

I'm thinking this is exactly why it isn't working in InfoPath...security
boundaries.

Now, the question is, can I circumvent this using managed code?

"RMack005" wrote:

> It's probably placing the unfiltered image on top of the filtered one.  Try
> using a transparent gif as the source for the IMG element and your png for
[quoted text clipped - 18 lines]
> >
> > Thanks in advance for the help.
Terry Thibodeau - 05 Aug 2005 21:58 GMT
Yes, I've come to that realization as well. It sure would be nice if
Microsoft took the png rendering from IE 7 and put it into InfoPath! HINT
HINT HINT!

For now, I just created a jpg with the background color set to the same as
the header where I was placing it and created another with a white background
for the print view. It's a hack, but works...

> It is my experience that filters/image transofrms do not work in InfoPath.
>
[quoted text clipped - 52 lines]
> > >
> > > Thanks in advance for the help.
Terry Thibodeau - 08 Aug 2005 23:36 GMT
I guess I didn't have my MSDN subscriber alias set up (which would explain
why I received no responses on this issue from support).

Now that I have set this up, I assume that I will receive a response within
2 business days. Is this the case?

> Yes, I've come to that realization as well. It sure would be nice if
> Microsoft took the png rendering from IE 7 and put it into InfoPath! HINT
[quoted text clipped - 60 lines]
> > > >
> > > > Thanks in advance for the help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.