Code Monkey home page Code Monkey logo

Comments (9)

BLumia avatar BLumia commented on September 14, 2024 1

Just randomly drew an ellipse and seems I'm able to reproduce this issue.

Screenshot

Original image used to test this bug

Anyway, I'll investigate it later™.

from pineapple-pictures.

BLumia avatar BLumia commented on September 14, 2024 1

Update: 36c54ad introduced a bug that has been fixed in 7a0ed5b. If you are using 36c54ad please consider update :)

from pineapple-pictures.

BLumia avatar BLumia commented on September 14, 2024

void GraphicsView::applyTransformationModeByScaleFactor()
{
if (this->scaleFactor() < 1) {
scene()->trySetTransformationMode(Qt::SmoothTransformation);
} else {
scene()->trySetTransformationMode(Qt::FastTransformation);
}
}

Currently pineapple-pictures uses QGraphicsPixmapItem::setTransformationMode with SmoothTransformation to smooth image when zoomed out, not sure how Gwenview did, will investigate it later™.

By the way, did you mind share the original image so I can use that to test on my machine?

Thanks!

from pineapple-pictures.

33KK avatar 33KK commented on September 14, 2024

Can't give that image right now, any image should work. I feel like there's some other transformation going on, since it looks fine in flameshot recent uploads window, which uses QLabel with scaled QPixmap

from pineapple-pictures.

BLumia avatar BLumia commented on September 14, 2024

https://github.com/KDE/gwenview/blob/d82258c4318188993a428f51e4a205083a121602/lib/documentview/rasterimageitem.cpp#L120

I don't have an image that very suited for testing this issue right now. It seems like Gwenview uses the same method (not 100% sure, just did a quick look), may look into it later. It could be an interesting issue if Gwenview really does that and the behavior is not the same :p

from pineapple-pictures.

BLumia avatar BLumia commented on September 14, 2024

I'm probably using the QGraphicsView/QGraphicScene in a wrong way. Currently, when zooming in and out, the program will apply the scale to the graphics view instead of the image (QGraphicsPixmapItem) item. The SmoothTransformation mode applied to the item seems will only work when the scale transform is applied to the item.

Maybe I need to refactor some part of the code to resolve this issue, still not sure about this. Anyway confirmed this issue and this should be resolved in later updates.

from pineapple-pictures.

BLumia avatar BLumia commented on September 14, 2024

Hi and could you try if 36c54ad resolved this issue?

from pineapple-pictures.

33KK avatar 33KK commented on September 14, 2024

Looks good now, thanks

Preview thing is also not using SmoothTransform btw
Screenshot

from pineapple-pictures.

BLumia avatar BLumia commented on September 14, 2024

Preview thing is also not using SmoothTransform btw
Screenshot

The preview and the main area share the same graphics scene so only one of them could look smooth in the current implementation. It's just a navigation preview so I guess it's okay ;P

I'll close this issue then, let me know if you found any other issue :)

from pineapple-pictures.

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.