Mid size image distorted

2 views
Skip to first unread message

gdhurst

unread,
Feb 24, 2009, 1:25:20 PM2/24/09
to farcry-dev
I uploaded a rather large image (1000H x 2000W) to the image library.
Everything worked fine except the midsize image is squished
horizontally. A little odd, I thought, because the thumbnail image
was resized perfectly. Why would one resize routine work and not the
other?

gdhurst

gdhurst

unread,
Feb 24, 2009, 1:26:54 PM2/24/09
to farcry-dev
Just noticed that the thumbnail has a padding attribute, but the
midsize doesn't. Perhaps this has something to do with it.

gdhurst

Matthew Williams

unread,
Feb 24, 2009, 1:38:24 PM2/24/09
to farcr...@googlegroups.com
Mid sized is set to like 1000x(something) for some reason. That can be
changed by extending the formtool component I believe. It's a bit of an
oddball... in fact I don't even allow users the choice of using it.


Matthew Williams
Geodesic GraFX

gdhurst

unread,
Feb 24, 2009, 1:54:38 PM2/24/09
to farcry-dev
Mid size image seems to be the default for the image browser that
loads when you click on the image that is produced by the image rule
that I have added to my page. Is there a way to change which image is
displayed in the image browser?

gdhurst

On Feb 24, 12:38 pm, Matthew Williams <webmas...@geodesicgrafx.com>
wrote:

modius

unread,
Feb 24, 2009, 2:45:07 PM2/24/09
to farcry-dev
The core code base is set to support CF7. CF7 image manipulation is
done using the native Java libraries on the server. Unfortunately,
for some image types it does not correctly resize the image. But not
to worry there are several solutions.

If you are on CF8 you cannot go past Jeff Coughlins CFIMAGE plugin.
This simply swaps out the image formtool for one that uses the u-beaut
CFIMAGE tag available in CF8.
http://docs.farcrycms.org/display/FCPLUG/FarCry+CFImage

If you are on CF7 and on a Windows machine, there is another plugin
that swaps out the standard image formtool for one using a CFX tag.
http://docs.farcrycms.org/display/FCPLUG/FarCry+CFXImage

Hope that helps,

-- geoff
http://www.daemon.com.au/

modius

unread,
Feb 24, 2009, 2:48:19 PM2/24/09
to farcry-dev
On Feb 25, 5:38 am, Matthew Williams <webmas...@geodesicgrafx.com>
wrote:
> Mid sized is set to like 1000x(something) for some reason.  That can be
> changed by extending the formtool component I believe.  It's a bit of an
> oddball... in fact I don't even allow users the choice of using it.

When working correctly it should be "fit inside" those dimensions.
Unfortunately for certain image types the Java manipulation makes a
mess of it and distorts the entire image to be that size.

Distorted images are not useful ;) But can easily be fixed using one
of the image plugins:
http://docs.farcrycms.org/display/FCPLUG/FarCry+CFXImage
http://docs.farcrycms.org/display/FCPLUG/FarCry+CFImage

-- geoff
http://www.daemon.com.au/

modius

unread,
Feb 24, 2009, 2:53:19 PM2/24/09
to farcry-dev
On Feb 25, 5:54 am, gdhurst <gdhurs...@gmail.com> wrote:
> Mid size image seems to be the default for the image browser that
> loads when you click on the image that is produced by the image rule
> that I have added to my page.  Is there a way to change which image is
> displayed in the image browser?

The image library view should be using the thumbnail by default. But
in any event you can customise that view very easily.

Unit 6 of the Jump start course talks about making a
librarySelected.cfm view for your content type:
http://docs.farcrycms.org/display/FCDEV50/FarCry+5.0+Jump+Start+Course

Long story short, copy the ./core/webskins/dmImage/librarySelected.cfm
template to ./projects/yourproject/webskins/dmimage/
librarySelected.cfm. Update the application to register the new
webskin. Open up the file and change the HTML to suit your needs.

-- geoff
http://www.daemon.com.au/

gdhurst

unread,
Feb 24, 2009, 4:45:01 PM2/24/09
to farcry-dev
Er, the librarySelected.cfm does not seem to be the right thing to
change.

When I change it, the only place I see changes is when I am in library
mode and dragging images over into my gallery.

I'm not talking about the inital gallery presentation either. I am
talking about the 'image viewer' that pops up when I click on a
gallery rule picture. It erases the website presentation, darkens the
entire browser window and shows the mid size picture all by itself in
the browser with arrows at the top and a number in between the arrows.

gdhurst

Tomek Kott

unread,
Feb 24, 2009, 5:03:03 PM2/24/09
to farcr...@googlegroups.com
i believe that's the greybox plugin. Look in /farcry/plugins/farcrygreybox (or something similar) and see how that plugin shows images. You also might have copied the javascript for that to your wwwroot folder, so check there for something similarly named.

Hope someone else chimes in, because I personally haven't used that plugin.

Tomek

modius

unread,
Feb 25, 2009, 8:16:43 AM2/25/09
to farcry-dev
On Feb 25, 8:45 am, gdhurst <gdhurs...@gmail.com> wrote:
> Er, the librarySelected.cfm does not seem to be the right thing to
> change.
>
> When I change it, the only place I see changes is when I am in library
> mode and dragging images over into my gallery.

Ah right... yep totally misinterpreted what you were after there. At
least you know how to change the library picker now :)

> I'm not talking about the inital gallery presentation either. I am
> talking about the 'image viewer' that pops up when I click on a
> gallery rule picture.  It erases the website presentation, darkens the
> entire browser window and shows the mid size picture all by itself in
> the browser with arrows at the top and a number in between the arrows.

This is the FarCry Greybox plugin. Its just a sample lugin for doing
a light box effect... not one of my favourties but its a good sample
nonetheless. If the standard greybox is not working for you it may be
that you need to put in a web server alias of /farcrygreybox to ./
plugins/farcrygreybox/www (or copy the latter folder into the webroot
of your project and rename it /farcrygreybox).

You can implement any sort of lightbox. One of my favourites is a
mootools one:
http://www.phatfusion.net/multibox/

Here's an example of it in action on a FarCry site:
http://www.colorbond.com/go/home/residential/innovations-and-inspirations/photo-gallery

I suspect it would be relatively easy to put together a plugin for
this and other lightbox options, but we tend to build these things to
suit the specific clients design.

-- geoff
http://www.daemon.com.au/

gdhurst

unread,
Feb 26, 2009, 12:29:11 PM2/26/09
to farcry-dev
I have fixed this problem. The logic is not right in the formtools
image.cfc for images that start out larger in both dimensions than the
mid size image parameters on the edit form. I may apply this to the
thumbnail logic too, as it also force resizes every image to the
aspect ratio defined on the edit form.

Since this image.cfc is part of the core, I suppose I should submit
this code to someone for possible inclusion. I haven't done this, so
what are the right processes and protocols for this kind of
submission? Or, should I just point out the problem and leave the
code writing to the experts?

gdhurst

On Feb 24, 12:25 pm, gdhurst <gdhurs...@gmail.com> wrote:

modius

unread,
Feb 26, 2009, 3:53:08 PM2/26/09
to farcry-dev
On Feb 27, 4:29 am, gdhurst <gdhurs...@gmail.com> wrote:
> I have fixed this problem.  The logic is not right in the formtools
> image.cfc for images that start out larger in both dimensions than the
> mid size image parameters on the edit form.  I may apply this to the
> thumbnail logic too, as it also force resizes every image to the
> aspect ratio defined on the edit form.

Excellent news!

> Since this image.cfc is part of the core, I suppose I should submit
> this code to someone for possible inclusion.  I haven't done this, so
> what are the right processes and protocols for this kind of
> submission?  Or, should I just point out the problem and leave the
> code writing to the experts?

That would be greatly appreciated. Post the complete code template to
an attachment at http://bugs.farcrycms.org/ -- you will need to be
logged in to create a bug. Sounds like this show go under the Core
framework project.

Many thanks,

-- geoff
http://www.daemon.com.au/
Reply all
Reply to author
Forward
0 new messages