liip / LiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library
http://liip.ch
MIT License
1.66k stars 378 forks source link

Problem with watermark #672

Open fmronan opened 8 years ago

fmronan commented 8 years ago

Sorry for my english. Since to have a problem with watermark, don't work correctly. class WatermarkFilterLoader is not call. Try with var_dump() and die() in __construct()don't enter in it.

fmronan commented 8 years ago

same problem with simple config watermark: filters: relative_resize: { widen: 1600 } watermark: image: %kernel.root_dir%/Resources/watermarks/watermark.png size: 0.5 position: center

in my view {{ entity.image.AssetPath | imagine_filter('watermark')}}"

and with runtimeConfig in my controller

$runtimeConfig = array( 'watermark' => array( 'image' => $this->container->getParameter('watermark_dir') . $entity->getProprio()->getWater()->getAssetPath(), 'position' => "center" ) );

$browserPath = $this->container->get('liip_imagine.cache.manager')->getBrowserPath($entity->getImage()->getAssetPath(), 'genus_watermark', $runtimeConfig);

    $deleteForm = $this->createDeleteForm($entity->getId());

    return $this->render('MediasBundle:Images:show.html.twig', array(
        'entity'      => $entity,
        'delete_form' => $deleteForm->createView(),
        'browserPath' => $browserPath,
    ));
}

in my wiew "{{ browserPath }}"

michellesanver commented 5 years ago

Let's investigate this together with #537 and make a new issue to look at watermarks in general :)