Rank: Newbie
Groups: Registered
Joined: 4/9/2021(UTC) Posts: 8 Location: Rotterdam Thanks: 2 times
|
On my product page I have several product images from my database. From this overview I want my users to select the products they want to work with by clicking on the image. But to see what image is clicked I'd like to show that clicked image in grayscale (and when they click it again it should be back in color again). The grayscale image doesn't need to be stored in the database.
I tried to use the function mt-change-image-colors but this function changes specific RGB colors. Alternatively I can store the grayscale image in a seperate column in the database, but that isn't my preferred solution.
Is there a function available to transform images to grayscale? If not, is there any other function available to recognise a clicked image (like a check-image overlay, colored border etc)?
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
There is no function to make image grayscale. If you don't want to add a second image to the database, then you can use table cell border to show selected image, or cell background color, or even a check box. I modified previous example to show how to handle such multiple selections and how to use the cell background color for that.
|
1 user thanked bbv for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 4/9/2021(UTC) Posts: 8 Location: Rotterdam Thanks: 2 times
|
Originally Posted by: bbv There is no function to make image grayscale. If you don't want to add a second image to the database, then you can use table cell border to show selected image, or cell background color, or even a check box. I modified previous example to show how to handle such multiple selections and how to use the cell background color for that. This works fine, thanks again!
|
|
|
|
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.