Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Image Size in Table (Read 2434 times)
billyb
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Jan 9th, 2007
Image Size in Table
Jan 9th, 2007 at 4:40pm
Print Post  
Hi,

I just started a trial and trying to decide if I want to buy the product.  I've run into a snag though.

I started with the WebApp example as I need browser independent support.

I'm using a Table with some cells containing text and one cell containing an image.  However, every single time the image is resized and I have been unable to figure out why.  I've tried ImageAlign with no success.

Here is the part of the code where I create the table.  The original image is 68w x 85h.  It is ALWAYS made larger even when the row height is less than 85.

[tt]MindFusion.WebChart.Table table = fc.CreateTable(200,level*280,210, 182);
table.ZIndex=1;
table.FillColor=Color.FromArgb(0xee,0xee,0xee);
table.AnchorPattern=AnchorPattern.TopInBottomOut;
table.RowHeight=20;
table.RedimTable(2,4);
table.Columns[0].Width=50;
table.Columns[1].Width=130;
table.Rows[0].Height=110;
table[0,0].ColumnSpan=2;
table.CellFrameStyle=CellFrameStyle.None;
table.CaptionHeight=0;
table.Caption="";


try
{
String path = Server.MapPath("Photos\\"+user.Userid+".jpg");
table[0,0].Image=System.Drawing.Image.FromFile(path);
table[0,0].ImageAlign=MindFusion.WebChart.ImageAlign.Center;
}
catch (Exception)
{
}
table[0,1].Text=" Name: ";
table[1,1].Text=user.Name;
table[0,2].Text=" Title: ";
table[1,2].Text=user.Title;
table[0,3].Text=" Email: ";
table[1,3].Text=user.Email;[/tt]

Any ideas on how to fix it?

Another Note: I attempted to simplify it down to a 1x1 table to debug the problem and the image started being rendered OUTSIDE the table.  That's just an FYI - not something I currently care about.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Image Size in Table
Reply #1 - Jan 9th, 2007 at 6:04pm
Print Post  
Hi,

Could you email me the image file so that we can try that here? I think the control does not use clipping when drawing cells, because that would slow down the drawing. So if the image is larger than the cell, try using the ImageAlign Stretch or Fit values.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Image Size in Table
Reply #2 - Jan 9th, 2007 at 6:11pm
Print Post  
One more thing; The image might be resized if its attributes specify a lower DPI value than the one set for the current output device. E.g. if the image is 72 DPI and the exported diagram bitmap is 96 DPI, the cell image will be scaled up.

Stoyan
  
Back to top
 
IP Logged
 
billyb
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Jan 9th, 2007
Re: Image Size in Table
Reply #3 - Jan 9th, 2007 at 7:57pm
Print Post  
Thanks.  The issue was the resolution.  I figured out a way via .NET to adjust the resolution and all looks good now.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint