Forums

Welcome Guest Search | Active Topics | Members

photoeditor image height/width Options
natebell
Posted: Friday, June 29, 2007 7:49:42 AM
Rank: Member
Groups: Member

Joined: 3/28/2007
Posts: 56
Points: 0
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
Posted: Monday, July 02, 2007 1:26:57 AM
Rank: Advanced Member
Groups: Member

Joined: 6/6/2007
Posts: 57
Points: 45
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;
}


Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
natebell
Posted: Monday, July 02, 2007 6:28:15 AM
Rank: Member
Groups: Member

Joined: 3/28/2007
Posts: 56
Points: 0
thanks, this works great!
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.