New feature: Grayscale your image

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
nameless1
Posts: 878
Joined: Sun 27. Apr 2008, 23:22

New feature: Grayscale your image

Post by nameless1 »

Once created temp images can be grayscaled too via sending it to cmsimage.php. cmsimage.php/convert-gs/thumbnail.pic will return GrayScale image when it exists.

Code: Select all

cmsimage.php/WxHxCROPxQUALITYxGS/HASH|ID.EXT will return GrayScale image.

All images can be GrayScale by default. Just set
$phpwcms['im_fix_colorspace'] = 'GRAY';
or
$phpwcms['colorspace'] = 'GRAY';
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: New feature: Grayscale your image

Post by update »

Practically spoken: How do you make use of this feature in ContentParts e.g.?
Is there any example around?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
nameless1
Posts: 878
Joined: Sun 27. Apr 2008, 23:22

Re: New feature: Grayscale your image

Post by nameless1 »

i guess -after an update of phpwcms- you have to enhance the syntax of callin images

check this enhanced with new setting

Code: Select all

cmsimage.php/WxHxCROPxQUALITYxGS/HASH|ID.EXT
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: New feature: Grayscale your image

Post by Oliver Georgi »

like this — Teaser image sample

Code: Select all

<img
    src="img/cmsimage.php/[PRIO]552[/PRIO][PRIO_ELSE]264[/PRIO_ELSE]x0x8/{THUMB_HASH}.{THUMB_EXT}" 
    data-grayscale="img/cmsimage.php/[PRIO]552[/PRIO][PRIO_ELSE]264[/PRIO_ELSE]x0x8x0xGS/{THUMB_HASH}.{THUMB_EXT}" 
    alt="[CAPTION]{CAPTION}[/CAPTION][CAPTION_ELSE]{IMAGE_NAME}[/CAPTION_ELSE]" 
    class="image-grayscale" 
/>
In addition I use a jQuery that filters elements by $('img.image-grayscale') and wraps the <img> tag by <span>. The span gets the $(this).data('grayscale') as CSS background image. Little CSS and opacity: 0 and :hover and you are done.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Old Boy
Posts: 1203
Joined: Fri 23. Nov 2012, 13:52

Re: New feature: Grayscale your image

Post by Old Boy »

Is there a "living" example everywhere on the WWW?
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: New feature: Grayscale your image

Post by Oliver Georgi »

Bauhaus Dessau (Google is your friend — rough currently, more new features under ongoing development)
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Old Boy
Posts: 1203
Joined: Fri 23. Nov 2012, 13:52

Re: New feature: Grayscale your image

Post by Old Boy »

Ahhhh, danke, jetzt kann mich mir was darunter vorstellen!
kmstario
Posts: 396
Joined: Thu 27. Jul 2006, 11:34
Location: Berlin
Contact:

Re: New feature: Grayscale your image

Post by kmstario »

Grandios :D ,

tolle Funktion, unbedingt in der WIKI festhalten :!:

Wie oft habe ich schon SW Images vorher erzeugt, um beide nutzen zu können.
--------------------------------------------

Alles Gelingen hat sein Geheimnis, alles Mißlingen seine Gründe.
PHPWCMS ist einfach nur großartig!
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: New feature: Grayscale your image

Post by update »

Da muss Oliver sagen, ob er sein JS-Schnipsel
Oliver Georgi wrote:In addition I use a jQuery that filters elements by $('img.image-grayscale') and wraps the <img> tag by <span>. The span gets the $(this).data('grayscale') as CSS background image. Little CSS and opacity: 0 and :hover and you are done.
veröffentlicht sehen will...
(und welcher Teil des JS genau die Funktion bereitstellt)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: New feature: Grayscale your image

Post by Oliver Georgi »

das Prinzip ist ersichtlich. Wer ähnliches benötigt, kann mich gerne beauftragen. 1:1 übertragen, möchte ich es nicht sehen.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply