YOUR ACCOUNT

Login or Register to post new topics or replies
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
I'm trying to figure out how to find the percentage value that will result in a width of 1 pixel in the final image. I don't think it is possible, but perhaps there is some indirect way this percentage value can be retrieved. For example if the image is 50 pixels wide, I need the percentage value 0.5 - but this should ofcourse scale to all input sizes.

Think of the offset component - how do I configure e.g. the horizontal offset so it only offsets one pixel?

Is it impossible? If so, it would really be cool with a new helper component that gives you the either the horizontal or vertical percentage scale constants for 1 pixel.
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
spinx,

i think this answer is already on the forums somewhere, and not that long ago...i think.
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Quote
Kraellin wrote:
spinx,

i think this answer is already on the forums somewhere, and not that long ago...i think.


Any specific hints? I already searched without luck..
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
no, not really. when uber and dilla and you and vlad start talking tech, i pack up and go argue about copyrights and licenses smile;)

but, it wasnt that long ago, certainly not a year ago. more like a couple or three months back at the most, i would say. and it had to do with moving an offset by one pixel regardless of image size. that's the part i do recall. so, maybe search 'pixel'?
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
Mousewrites
Not life size.

Posts: 192
Filters: 20
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Quote
Mousewrites wrote:
http://www.filterforge.com/forum/read...ssage29754


Is that it?


Been there already, no good. It would be easy to grab the calculator and calculate the relative percentage for a given image - but I want to find some generic approach... I don't think its possible smile:(
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
Quote
Sphinx. wrote:
I don't think its possible


i think that was the conclusion in the other thread as well.
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Hi Sphinx,

I took up your challenge and made a slider-based solution for offsetting an image by pixel, which works in the image-size range of 10 to 1000 pixels.

(I'm attaching the filter file here -- hopefully comes through)

The user has to input the image size using a slider (and a checkbox to extend the range from 100 to 1000), and the filter does the calculation based on it. Of course, only works correctly at the right slider value.

As to the mathematics involved, I used the bias curve to convert the slider input to a percentage. (The final percentage is expressed by luminosity. You'll have to look at the filter to see how this works.)

Hope this helps. If so, I'll submit it as a snippet.

TD

Pixel-based offset.ffxml
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Interesting solution TD smile:)

However it relies on the user to input the correct values - we cant trust them to do that smile;) smile:D

Due to something that looks like a bug in the motion blur (when directional = 100), I found a way to offset x + 1, y - 1 (see the attached filter), this can probably be extended to do all directions and pixel offsets - but if it is really a bug, its probably not wise to rely on it..

Motion Blur Bug Offset.ffxml
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Generic solution found!

The attached filter exploits the motion blur offset issue (dunno if it really is a bug..) to find the correct 1 pixel relative offset values.

When a slider is positioned in the middle (value 2), there is no offset. Value = 1 equals a -1 pixel offset, value = 3 equals a +1 pixel offset.

This approach or a modification of it can be used to control any offset or percentage input with exact pixel measures.

1 Pixel Offset.ffxml
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,533 Posts
+38 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

26 unregistered users.