Image Gallery, Maintain Aspect Ration

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
10/24/2006 8:59:18 PM
Gravatar
Total Posts 1
JWise

Image Gallery, Maintain Aspect Ration

How's it going, I have downloaded and was playing around with the mojo portal, was considering looking at it for this guy I know on the side to setup a quick content managment website for him.  It looks really well done and nicely put together...

I did have two questions about the image gallery. One is when the code is generating the "thumbnail" I noticed it's not maintaining the aspect ratio... for example if I have an image that 750px wide by 1000 tall it skews the image and makes it look fat.  When generating the thumbnail you may want to calculate the ratio (for example  750/1000 = .75).  It seems to be ok, when the width > than the height. 

But once you have the aspect ratio  you would know that how to set the new height or width for any image size: for example.

let's say you want the new width to 375 (half) then the new height would be 375 / (.75)

or let's say you know the new height to be 500 then the new width would be 500*.75.

You can google, "Maintaining Aspect Ratio" and find some code samples. It bascially involves check if the width < height and multiplying or dividing by the aspect ratio based on that action.

The other question I had was the fckeditor is used for the description, but I couldn't seem to get the description to show up? Is it suppose to?

10/25/2006 3:01:03 AM
Gravatar
Total Posts 18439

Re: Image Gallery, Maintain Aspect Ration

Hey Jason,

Long time no see man, hope you're doing well. I just moved to Charlotte, NC and am starting my own consulting company to do custom web app development mostly on top of mojoPortal. Just moved on Sunday and still unpacking.

The description not showing up as well as the technical data not showing up is a bug I introduced recently when I added the iBox animation to display the image. I was making changes so the gallery module could be used as a WebPart like on the MyPage page http://www.mojoportal.com/MyPage.aspx but I unhooked some things that used to work and never got to hooking them back up. I will be fixing that soon though and will put out an incremental release.

Good tip on the aspect ratio, I'll look into fixing that soon as well. I had noticed that vertical images created funky thumbnails but didn't know there was an easy way to fix it.

Of course I'd love to have your help on the project too so if you make any good changes send them my way.

Cheers,

Joe
10/26/2006 4:26:16 PM
Gravatar
Total Posts 18439

Re: Image Gallery, Maintain Aspect Ration

This is now fixed in svn branches/joesandbox2, the fix will also be in the next release.

Cheers,

Joe
You must sign in to post in the forums. This thread is closed to new posts.