I found a more complete solution that will force a width property that is scaled correctly:
Firstly you need to add an id to the large image, to do this alter the following line of code in the onPageLoad function in the jquery.galleria.js file:
var _img = $(new Image()).attr('src',_src).addClass('replaced');
add to it so that it now looks like the following:
var _img = $(new Image()).attr('src',_src).attr('id','mainImg').addClass('replaced');
This now adds an id to the image so it can be targeted.
Next, in your index file (or where ever you have placed the code that initiates the gallery) you now alter the code as below:
// fade in the image & caption
if(! ($.browser.mozilla && navigator.appVersion.indexOf("Win")!=-1) ) { // FF/Win fades large images terribly slow
image.css('display','none').fadeIn(1000);
}
var newHeight = 420;
var mainImage = document.getElementById('mainImg');
var imgInitHeight = mainImage.height;
var imgInitWidth = mainImage.width;
var imgScaleRatio = newHeight/imgInitHeight;
var newWidth = Math.ceil(imgInitWidth*imgScaleRatio);
image.css('height', newHeight);
image.css('width', newWidth);
caption.css('display','none').fadeIn(1000);
The variable newHeight is the height you would like the large image to be displayed at. Next you need to target the image in order to obtain its height and width BEFORE it is resized, these values are stored in imgInitHeight and imgInitWidth respectively. Now, seeing as you know the newHeight and imgInitHeight values it is possible to calculate the ratio by which the image must be scaled for it to reach its new dimensions, this is stored in the imgScaleRatio property.
Once the ratio is determined, you can now calculate the newWidth of the image and be confident that this is scaled correctly. Once this is done simply apply the css values to the image and youre done! Hope this helps someone.
Jon Tivy-Jones