Jump to content

Scaling down images quality


Sara
 Share

Recommended Posts

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);

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...