Giter Site home page Giter Site logo

Comments (4)

mmahmoudian avatar mmahmoudian commented on July 22, 2024 1

I'm looking for/suggesting a feature to maintain the window size and shrink* the image to fit and fill the surrounding with transparent space (which is controlled by --background-pattern).

  • There are two ways in my mind to address this. either always "scale to fit", so that also smaller images get enlarged, or "scale large to fit" to only reduce the size of images that does not entirely fit into the window dimension, but does not enlarge the smaller images. I personally prefer the "scale large to fit".

from pqiv.

phillipberndt avatar phillipberndt commented on July 22, 2024

set_scale_mode_fit_px is supposed to provide this feature. I don't understand what exactly doesn't work. Could you elaborate?

from pqiv.

mmahmoudian avatar mmahmoudian commented on July 22, 2024

Thanks for the response and sorry for the delay in my response :)

To demo what I mean, I downloaded all the CC0 images from the first page of the following URL:

https://wordpress.org/openverse/search/image?q=software&license=cc0&extension=png

and ran pqiv --action "set_scale_mode_fit_px(100, 200)" ./Pictures/test_pqiv/*.png . The expected behavior is to have a 100x200 pixel window with persistent dimension, but what we get is a dynamically changing window dimension:

Peek.2022-04-21.13-38.mp4

from pqiv.

phillipberndt avatar phillipberndt commented on July 22, 2024

Ah. pqiv still maintains the aspect ratio of the image and resize the window accordingly to fit within the bounding box specified by the parameter.

What's your expected behavior in case the aspect ratio doesn't fit?

from pqiv.

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.