Jump to content

Please help me in this topic.


Rishabh Shukla
 Share

Recommended Posts

import React from "react";
import { useSelector } from "react-redux";
import { imgUploadSelector } from "../redux/imageuploadSlice";
import { Stage, Sprite, withFilters, Container } from "@pixi/react";
import * as PIXI from "pixi.js";

const Pallet = () => {
  const { uploadedImage } = useSelector(imgUploadSelector);
  const Filters = withFilters(Container, {
    blur: PIXI.BlurFilter,
    matrix: PIXI.ColorMatrixFilter,
  });

  return (
    <div className="flex justify-center">
      <Stage height={uploadedImage.height} width={uploadedImage.width}>
        <Filters
          blur={{ blur: 0 }}
          matrix={{ enabled: true }}
          apply={({ matrix }) => {
            matrix.contrast(2);
            matrix.brightness(2);
          }}
        >
          <Sprite image={uploadedImage.image} />
        </Filters>
      </Stage>
    </div>
  );
};

export default Pallet;

I want help why in this only last property brightness is only showing in my screen not contrast. I have tried using Adjustment filter but it has been deprecated. I tried to get answer in stack overflow but not got any answer. Any help in this topic or matter is appreciated. Please contact to me via mail [email protected]
Thankyou :)

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...