Your Cart

Possible to not resize or crop thumbnails?

These forums are now closed to new replies / tickets.

Please open a support ticket from our new Support page.

Front Page Forums Questions Possible to not resize or crop thumbnails?

  • gravatar
    Cal Palmore
    November 1, 2014 at 6:56 pm

    I’m using theme Twelve and I want Galleria to use the thumbnails
    that I give it without resizing or cropping them.

    If I set the thumbCrop option to false then the height to width
    ratio of each thumbnail is preserved, which is good. But the
    thumbnails are still being resized. Is there any way to control the
    size of the thumbnails without also cropping the thumbnails?


    gravatar
    Cal Palmore
    November 1, 2014 at 6:57 pm

    The discussion is now public.


    gravatar
    Mark Ellis
    November 1, 2014 at 11:49 pm

    Are you working in the html or in the galleria.twelve.js
    file?

    Have a look at the settings for the thumbnails in the js
    file

    Attachments:
    1. galleria-crop


    gravatar
    Cal Palmore
    November 2, 2014 at 1:05 am

    I was trying to limit my changes to the html file.

    In any case, I’m still unclear how the settings in the js file
    would make sure the thumbnails are neither resized nor cropped.

    –Cal


    gravatar
    Mark Ellis
    November 2, 2014 at 8:18 am

    Changes are made in the galleria.twelve.js file, not code added
    to the html.

    The options in the js file are like switches, to turn something
    on or off.

    Are you using the full size galleria.twelve.js – or working with
    the minimized galleria.twelve.js.min which one can’t make any sense
    of?

    Full version attached. Look at line 20

    Attachments:
    1. galleria.twelve.js


    gravatar
    Cal Palmore
    November 2, 2014 at 4:53 pm

    Mark,

    The version of galleria.twelve.js that you attached is certainly
    easier to understand than the galleria.twelve.min.js that was
    included in the zip file I got. However it looks like a different
    version than mine. The galleria.twelve.min.js file that I have says
    “This version of Twelve theme requires Galleria version 1.4 or
    later”. And there are many differences in the css code too. How do
    I find a galleria.twelve.js that matches the galleria.twelve.min.js
    file that I have?

    –Cal


    gravatar
    Mark Ellis
    November 2, 2014 at 6:41 pm

    Oh, OK. They’ve done an update then. I’ll have to download the
    new one.

    I’m using Galleria 1.3.5 at the moment, so wonder if they’ve
    finally fixed the you tube videos in Picasa albums issue.

    Anyway –
    min in the file name means that it has been minimised, or shrunk in
    size, by removing all the spaces and blank lines.

    If you open your galleria.twelve.min.js file, right at the start
    will be the version name and/or date. Like in this screen shot.
    Please let me know what it says.

    Two choices for you, are to Google/search for galleria.twelve.js
    and include the version date – or spend some time working out where
    the lines should be and pressing the return/enter key at the right
    place.

    I’ll have a search later, see if I can find a full version

    Attachments:
    1. galleria-twelve-version


    gravatar
    Mark Ellis
    November 2, 2014 at 6:59 pm

    Just downloaded galleria.twelve with version galleria.1.4.2

    I’d forgotten that twelve and other demos html’s have the css
    styling in the actual html itself. Better to create a css file for
    a couple of reasons. One is that you can reset everything to try
    and stop browsers from forcing their own style on your slideshow.
    The other is it helps the page to work better with a separate css
    file to call details/rules from


    gravatar
    Cal Palmore
    November 6, 2014 at 5:14 pm

    OK, I found a hack that can work around this problem. First set
    the thumbCrop option to false. Next find a section in the
    galleria-x.x.x.js file that looks like this:

    thumb.data = {
    width : Utils.parseValue( getStyle( ‘width’ ) ), height :
    Utils.parseValue( getStyle( ‘height’ ) ), order : i, src : src
    };

    Turns out you can multiply the width and height values by some
    factor to increase or decrease the default size of the thumbnails.
    For example:

    width  : Utils.parseValue( getStyle( 'width' ) )*1.8,
    height : Utils.parseValue( getStyle( 'height' ) )*1.8,
    

    I don’t know where the default thumbnail resize value comes
    from. But you can use this hack to adjust the size of your
    thumbnails to your liking. While this is better than accepting the
    default, I would still like to know how to stop thumbnails from
    being resized. So if anyone knows how to do that please let me
    know.


Galleria.io uses cookies to store information. You can read more about that in our Privacy Policy. I understand