Author Topic: Draw Watermark - Size always different  (Read 8445 times)

Offline Juerg

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Draw Watermark - Size always different
« on: July 30, 2012, 02:35:58 PM »
Drawing a Watermark to the corner of a picture with the scale option "fit to area" and the "draw near outside edges" selected should, as I understand it, draw the watermark always to about 1/3 of the picture width, no matter what size picture I define in the "Save As" dialogue.

For example, if I save a pic in landscape format with watermark to fit 1200 px, I would expect the watermark to be approx. 400 px wide. If I save the same pic to fit 600 px, the watermark should be 200 px wide and so on.

Unfortunately, that is not the case and the watermark is always different in size. How can I make sure it's always constant in relation to picture width?

Thanks
Juerg
« Last Edit: July 30, 2012, 02:43:13 PM by archer69 »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Draw Watermark - Size always different
« Reply #1 on: July 30, 2012, 03:01:27 PM »
Juerg,

Drawing a Watermark to the corner of a picture with the scale option "fit to area" and the "draw near outside edges" selected should, as I understand it, draw the watermark always to about 1/3 of the picture width, no matter what size picture I define in the "Save As" dialogue.

For example, if I save a pic in landscape format with watermark to fit 1200 px, I would expect the watermark to be approx. 400 px wide. If I save the same pic to fit 600 px, the watermark should be 200 px wide and so on.

Unfortunately, that is not the case and the watermark is always different in size. How can I make sure it's always constant in relation to picture width?

Can you show me some specific examples where saving the same image twice (with the same settings) produces different results?

-Kirk

Offline Juerg

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Draw Watermark - Size always different
« Reply #2 on: July 31, 2012, 05:31:18 AM »
Kirk,

For example, if I save a pic in landscape format with watermark to fit 1200 px, I would expect the watermark to be approx. 400 px wide. If I save the same pic to fit 600 px, the watermark should be 200 px wide and so on.

Can you show me some specific examples where saving the same image twice (with the same settings) produces different results?

Here are examples of a picture saved without resizing, one time resized to 640 px, 2000 px and 5000 px. The watermark drawn should always be the same "ratio" in regard to the corresponding picture size, but it is not (especially on the "original" sized one). Why?



[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Draw Watermark - Size always different
« Reply #3 on: July 31, 2012, 06:59:59 AM »
Juerg,

For example, if I save a pic in landscape format with watermark to fit 1200 px, I would expect the watermark to be approx. 400 px wide. If I save the same pic to fit 600 px, the watermark should be 200 px wide and so on.

Can you show me some specific examples where saving the same image twice (with the same settings) produces different results?

Here are examples of a picture saved without resizing, one time resized to 640 px, 2000 px and 5000 px. The watermark drawn should always be the same "ratio" in regard to the corresponding picture size, but it is not (especially on the "original" sized one). Why?

I don't know yet.  Can you post a screenshot of your Watermarking settings, and attach your watermark overlay image?

Thanks,

-Kirk

Offline Juerg

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Draw Watermark - Size always different
« Reply #4 on: July 31, 2012, 07:35:48 AM »
Kirk,

I don't know yet.  Can you post a screenshot of your Watermarking settings, and attach your watermark overlay image?

Here the screenschot and watermark overlay image:


[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Draw Watermark - Size always different
« Reply #5 on: July 31, 2012, 08:03:32 AM »
Juerg,

I don't know yet.  Can you post a screenshot of your Watermarking settings, and attach your watermark overlay image?

Here the screenschot and watermark overlay image:

I'll do some experimentation and get back to you later today.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Draw Watermark - Size always different
« Reply #6 on: July 31, 2012, 01:27:35 PM »
Juerg,

The reason your larger images (original size, and 5000) don't show a consistently larger logo than the ones in your smaller images (2000 and 640) is because the Watermarker will never scale up your logo image.  That said, I have improved the case where it does need to scale by scaling the logo's rectangle to the destination region rectangle instead of what it did prior to my changes.  What it used to do is when it determined that scaling needed to be done, it would take the smaller dimension of the destination region rectangle and scale the logo to the square box defined by the smallest dimension.  The new method should be more consistent.

Now, if you want to make sure that your logo is always scaled down to fit the destination region, you need to make sure that your logo image is larger than the 1/3 size of your largest image you plan to save as.

The Watermarker changes will be reflected in the next build.

-Kirk

Offline Juerg

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Draw Watermark - Size always different
« Reply #7 on: July 31, 2012, 02:48:23 PM »
Hi Kirk,

Thanks for your investigation.

I tried it with a Watermark logo that is larger than 1/3 of the largest image size and did again a test with a 5000, origiginal (in this case 3540), 2000 and 640 px file. In all cases now the logo shows the same size (it has to be resized for ALL to fit the 1/3rd). But because it is a landscape image it scales it not to 1/3rd of the horizontal (long) side, but rather 1/3 of the vertikal (short) side. I guess that's the behavior you described.

If I understand you correct you changed it the way that in the future it draws the watermark always based on the largest 1/3rd dimension of the image. So all watermarks for pictures that are for example 640 pix on the long side (no matter landscape or portrait orientation) should take the long side of 640 px as base and scale it to 1/3rd of that.

Is that correct?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Draw Watermark - Size always different
« Reply #8 on: August 01, 2012, 09:04:21 AM »
Juerg,

I tried it with a Watermark logo that is larger than 1/3 of the largest image size and did again a test with a 5000, origiginal (in this case 3540), 2000 and 640 px file. In all cases now the logo shows the same size (it has to be resized for ALL to fit the 1/3rd). But because it is a landscape image it scales it not to 1/3rd of the horizontal (long) side, but rather 1/3 of the vertikal (short) side. I guess that's the behavior you described.

If I understand you correct you changed it the way that in the future it draws the watermark always based on the largest 1/3rd dimension of the image. So all watermarks for pictures that are for example 640 pix on the long side (no matter landscape or portrait orientation) should take the long side of 640 px as base and scale it to 1/3rd of that.

Is that correct?

Not quite.  Your logo image will be sized to fit the 1/3 rectangle in the destination image.  See the illustration I created and I think things will become clearer.



[attachment deleted by admin]

Offline Juerg

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Draw Watermark - Size always different
« Reply #9 on: August 01, 2012, 03:29:51 PM »
Hi Kirk,

Your sketch shows how it is working right now, isn't it? So what changes did you exactly foresee for the new build?

Is it possible to have the option to specify pixel size (how wide) one wants the image drawn and have the 9 sections only to specify the location rather than the size as well.

That way one could specify to save pictures to fit for example 600 px, the logo size for example 200 px wide, and the sector the lower left corner. That way all watermarks will be the same size in regard to picture size, no matter whether it's landscape or portrait.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Draw Watermark - Size always different
« Reply #10 on: August 01, 2012, 03:57:37 PM »
Your sketch shows how it is working right now, isn't it? So what changes did you exactly foresee for the new build?

No, it shows how it will work in the next build.  I have attached another example that illustrates how the current build works.

Quote from: archer69
Is it possible to have the option to specify pixel size (how wide) one wants the image drawn and have the 9 sections only to specify the location rather than the size as well.

That way one could specify to save pictures to fit for example 600 px, the logo size for example 200 px wide, and the sector the lower left corner. That way all watermarks will be the same size in regard to picture size, no matter whether it's landscape or portrait.

No.  But currently you can choose to scale the logo only if it is too large (Scale: only if too large) and if you make your logo small enough to fit in the chosen area for all image sizes you would normally save to then the logo will never get scaled.  It will mean that the logo will look large on small images and small on large images though.

Here is the way the current build works.  Notice the landscape image difference.



[attachment deleted by admin]

Offline Juerg

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Draw Watermark - Size always different
« Reply #11 on: August 02, 2012, 12:24:41 AM »
Hi Kirk,

Hm, not sure which way is better.

I think the current way would be better if it would take the long side of a picture as base, not the short side.

Currently it takes the short side of a picture (no matter landscape or portrait) as base for scaling. As I use the save as dialogue with the "fit to box" option the large side of a picture is allways consisten, the short side varies due to different aspect ratios of the pics, which means the size of the watermark varies also.

For example: Take one picture each in landscape and in portrait orientation, all in aspect ratios of 4:3, 6:4, 7:5, 10:8 and resize them all to consitent "fit to box" value (does not matter what). All watermarks are different in the current setup, but even more so in the new setup.

If the current way would work great if it could be changed to always take the long side as base, I think that would make it work verye well. Then all watermarks are always the same size for pictures saved to a certain "fit to box" size, no matter landscape or portrait and no matter the aspect ratio of the picture.

Of course better still, much more flexible and probably usefull for everyone would be the option to scale to a specific px size.
« Last Edit: August 02, 2012, 12:34:11 AM by archer69 »