image width

May 22, 2010 at 12:11 AM

How do I manage the image width inside the slide show?

below is my current definition. However it displays the picture in the middle and not taking the whole space.

<

 

object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="800" height="220">

 

<param name="background" value="black" />

 

<param name="source" value="Vertigo.SlideShow.xap" />

 

<param name="initParams" value

="ConfigurationProvider=LightTheme,DataProvider=XmlDataProvider;Path=Data.xml"/>

 

 

</object

>

Jun 2, 2010 at 4:55 PM

This code is what is on your page and the height and width is the size of the gallery object on your page not the size of the images.  The size of the imgs are controlled by the config file.  If nothing is set then its whatever the defaults are in LightTheme that you are using.  I think the defaults are to shrink the img along whichever is the longest side to fit inside the size of the gallery object.  I know there is a stretch/zoom to fit option but do not recall the specific code for it.  You would need to use you own configuration file to use this.

I also prefer the imgs to completely fill the gallery object side-to-side and top-to-bottom.  What I have done is edit my imgs to match the size of the gallery object.  This means substantially cropping imgs that are more vertical than horizontal (portrait orientation).  This manual editing can be tedeous if you have a large img set but the results are sure worth it!

Irfanview is a free img editor that can batch process imgs.  Only downside to batch processing is it will occasionally crop out something important.  However, you can perform a batch edit and then go back and manually edit whichever imgs require it.  I prefer manually editing imgs as I find the results are worth the time invested.

Before editing your imgs first ensure If you are happy with your gallery object being sized at 800 x 220 as noted in your code.  Then make copies of a few imgs as a test.  Resize/crop them to 800 x 220 and see if you like how they appear in the gallery.

If you create your own configuration file then you can dial in settings individually instead of whatever LightTheme uses.  There are configuation guides available to help get you started.  If you use your own configuration file, you will need to change your page from
<param name="initParams" value="ConfigurationProvider="LightTheme",DataProvider=XmlDataProvider;Path=Data.xml" />
to
<param name="initParams" value="ConfigurationProvider=XmlConfigurationProvider;Path=Configuration.xml,DataProvider=XmlDataProvider;Path=Data.xml" /> and place the Configuration.xml file in the same folder as your webpage.