Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
natebell  
#1 Posted : Thursday, June 28, 2007 11:49:42 PM(UTC)
natebell

Rank: Member

Groups: Member
Joined: 3/28/2007(UTC)
Posts: 56

when users rotate the image the imageholder has a scroll bar

i'd like to be able to get rid of the pan/zoom features and just have the image show up regular size and never cause an inner scroll bar, how do i accomplish this?

thanks,
Nate
Sergey Peshekhonov  
#2 Posted : Sunday, July 1, 2007 5:26:57 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups:
Joined: 6/5/2007(UTC)
Posts: 57

Hello, Nate.

Now, the size of ImagePanel can not be changed without postback. So, you may use one of the following partial solutions:

1. To remove scroll bars you may use property named ZoomMode into PhotoEditorController and set it to BestFit or BestFitShrinkOnly.

In PhotoEditorSample application (which may be installed using link "Install PhotoEditor Sample Application")
you can do it making following changes into \PhotoEditorSample\PhotoEditor\PhotoEditorSample.ascx file:

Code:
<aur:PhotoEditorController ID="PhotoEditorController1" runat="server" QualityMeter="QualityMeter1"
		ImagePanel="ImagePanel1" ShowExitMessage="True" CommandPanel="CommandPanel1">
	</aur:PhotoEditorController>

replace to

Code:
<aur:PhotoEditorController ID="PhotoEditorController1" runat="server" QualityMeter="QualityMeter1"
		ImagePanel="ImagePanel1" ZoomMode="BestFit" ShowExitMessage="True" CommandPanel="CommandPanel1">
	</aur:PhotoEditorController>


2. Try to set Width and Height of ImagePanel to maximum size of image. To do this make following steps:

a) Set property named ViewportAlignment into ImagePanel to TopLeft.
b) Set property named ZoomMode into PhotoEditorController to None.
c) Set property named ResizingEnabled into ImagePanel to False.
d) Replace Page_Load method in Default.aspx:

from

Code:
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        PhotoEditorSample1.SourceImageFileName = MapPath("photo.jpg");
    }
}
to
Code:
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        PhotoEditorSample1.SourceImageFileName = MapPath("photo.jpg");
        Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(PhotoEditorSample1.SourceImageFileName);
        PhotoEditorSample1.ImagePanel.BitmapViewer.Width = 
        PhotoEditorSample1.ImagePanel.BitmapViewer.Height = Math.Max(bitmap.Width, bitmap.Height);
    }
}

e) Change css styles according to Theme and your design. At the minimum you should replace description of class PhotoEditorSampleImagePanel:

from

Code:

.PhotoEditorSampleImagePanel
{
	position:absolute;
	top: 42px;
	right: 10px;
}

to

Code:

.PhotoEditorSampleImagePanel
{
	position:absolute;
	top: 42px;
	left: 250px;
}

Edited by user Tuesday, December 18, 2007 3:00:55 AM(UTC)  | Reason: Not specified

Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
natebell  
#3 Posted : Sunday, July 1, 2007 10:28:15 PM(UTC)
natebell

Rank: Member

Groups: Member
Joined: 3/28/2007(UTC)
Posts: 56

thanks, this works great!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.