Page 1 of 1
New feature: Grayscale your image
Posted: Wed 6. Nov 2013, 09:55
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';
Re: New feature: Grayscale your image
Posted: Wed 6. Nov 2013, 10:22
by update
Practically spoken: How do you make use of this feature in ContentParts e.g.?
Is there any example around?
Re: New feature: Grayscale your image
Posted: Wed 6. Nov 2013, 12:56
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
Re: New feature: Grayscale your image
Posted: Thu 7. Nov 2013, 00:19
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.
Re: New feature: Grayscale your image
Posted: Thu 7. Nov 2013, 09:36
by Old Boy
Is there a "living" example everywhere on the WWW?
Re: New feature: Grayscale your image
Posted: Thu 7. Nov 2013, 09:45
by Oliver Georgi
Bauhaus Dessau (Google is your friend — rough currently, more new features under ongoing development)
Re: New feature: Grayscale your image
Posted: Thu 7. Nov 2013, 15:14
by Old Boy
Ahhhh, danke, jetzt kann mich mir was darunter vorstellen!
Re: New feature: Grayscale your image
Posted: Fri 8. Nov 2013, 11:03
by kmstario
Grandios

,
tolle Funktion, unbedingt in der WIKI festhalten
Wie oft habe ich schon SW Images vorher erzeugt, um beide nutzen zu können.
Re: New feature: Grayscale your image
Posted: Fri 8. Nov 2013, 11:09
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)
Re: New feature: Grayscale your image
Posted: Fri 8. Nov 2013, 12:49
by Oliver Georgi
das Prinzip ist ersichtlich. Wer ähnliches benötigt, kann mich gerne beauftragen. 1:1 übertragen, möchte ich es nicht sehen.