Giter Site home page Giter Site logo

Cropped images about fcms HOT 8 CLOSED

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024
Cropped images

from fcms.

Comments (8)

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024

Make that:
inc/Upload/PhotoGalery/Form/Plupload.php

from fcms.

ryanhowdy avatar ryanhowdy commented on June 10, 2024

You mean the thumbnail, right? Because the actual pictures should not be cropped.

from fcms.

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024

There are up to three images copied: thumbnail (tb_), regular (), and full (full_). [I realize that you obviously know this I only included it so my context is clear.] Of these three both thumbnail and regular are cropped. When full is enables it is the only image that is not cropped.

from fcms.

ryanhowdy avatar ryanhowdy commented on June 10, 2024

Thanks for reminding me. I guess I forgot we crop the regular size as well.

In a perfect world, you would never not have full sized photos on. The only reason that is an option is because some people would run out of server disk space way too soon with the size of photos these days. So I think that made more sense to crop the regular when it was assumed that you would have 3 sizes. But it was requested to have full size optional.

It seems like a good opportunity to describe how full sized photos works on the front-end better. And maybe switch them on by default, instead of off.

from fcms.

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024

The only reason I turned on full size photos was because all other photos were cropped.
I would rather not store the full size photos but the way things are now it's the only way to see the whole image.
P.S. Though I wouldn't mind bumping the photo maximum size from 600x600 to something like 1200x1200 for a little better detail in the stored images.

from fcms.

ryanhowdy avatar ryanhowdy commented on June 10, 2024

I know we keep saying cropped, but to be perfectly clear and precise. I think only the thumbnail is cropped. The regular photo is resized to be no wider than 600, but should retain the aspect ratio. So if the photo is 1200 wide by 300 tall, it would get resized to 600x150.

This can be verified here.

I think the 600x600 size was chosen because that is the amount of pixels to show by default in the default theme. So making it larger seemed unnecessary. I'm not sure if maybe we should give more options so the user could decide what size to use as regular or maybe just create a 4th size. Thumbnail, medium, large and full. Where regular becomes medium. Maybe even have them all configurable.

from fcms.

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024

Agreed but when the images are uploaded by inc/Upload/PhotoGalery/Form/Plupload.php:

                    BeforeUpload: function(up, file) {
                        if ("thumb" in file) {
                            up.settings.resize         = { width: 150, height: 150, quality: 80, crop: true };
                            up.settings.resize.enabled = true;
                            up.settings.resize.width   = 150;
                            up.settings.resize.height  = 150;
                            up.settings.resize.quality = 90;
                            up.settings.resize.crop    = true;
                            up.settings.file_data_name = "thumb";

                            if ("full" in file) {
                                up.settings.resize.enabled = false;
                                up.settings.file_data_name = "full";
                            }
                        }
                        else {
                            up.settings.resize.enabled = true;
                            up.settings.resize.width   = 600;
                            up.settings.resize.height  = 600;
                            up.settings.resize.crop    = true;     <<<<
                            up.settings.file_data_name = "main";
                        }
                    },

Changing 'true' to 'false' here makes the software behave as you describe.

from fcms.

ryanhowdy avatar ryanhowdy commented on June 10, 2024

Well that is inconsistent.

I'd consider this a bug and needs fixed.

This should be consistent across the different upload types.

thumbnail

  • resized (150x150) exact
  • cropped

main/regular

  • resized (600x600) max size
  • NOT cropped

full

  • NOT resized
  • NOT cropped

from fcms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.