Scaling down images quality #9603
saraOrkide
started this conversation in
General
Replies: 2 comments 7 replies
-
The scaleMode needs to be set on the Texture not on the sprite. Try this: |
Beta Was this translation helpful? Give feedback.
6 replies
-
My photo svg |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I load a photo in zoom 3, but the image quality is very low. In zoom 1, it is good, but when I zoom in higher, the image is not sharp.
The code I use is like this, I am working with version 7 of pixi and it is the latest version from pixi-viewport
const texture = await Assets.load(url);
const image = Sprite.from(texture,
{
resolution: 1,
scaleMode: PIXI.SCALE_MODES.NEAREST,
resourceOptions: {
scale: viewport.scaled,
autoLoad: true,
MimeType: 'image/svg+xml'
}
}
);
viewport.addChild(image);
Beta Was this translation helpful? Give feedback.
All reactions