1. uriel mehamed
  2. django-watermark-posfix

Commits

uriel mehamed  committed aa94f5a Draft

fixed positioning ug after resize

  • Participants
  • Parent commits 2c8288e
  • Branches default

Comments (0)

Files changed (1)

File watermarker/templatetags/watermark.py

View file
  • Ignore whitespace
 
         # see if we need to create only one randomly positioned watermarked
         # image
-        if not random_position or \
-            (not random_position_once and random_position):
-            log.debug('Generating random position for watermark each time')
-            position = pos
-        else:
-            log.debug('Random positioning watermark once')
+        # commented as we need to let position be applied in utils.watermark
+        # after resize is done
+#        if not random_position or \
+#            (not random_position_once and random_position):
+#            log.debug('Generating random position for watermark each time')
+#            position = pos
+#        else:
+#            log.debug('Random positioning watermark once')
 
         params = {
             'position':  position,
                 return wm_url
 
         # make sure the position is in our params for the watermark
-        params['position'] = pos
+        # commented as we need to evaluate this after resize done
+        # why is this done twice anyway?
+#        params['position'] = pos
 
         self.create_watermark(target, mark, wm_path, **params)