xod

Unfinished plugins

Recommended Posts

Thank you Remake for reply.
Yes, I want all sliders to stay connected.
As in the clip below:

 

 

Edited by xod

Share this post


Link to post
Share on other sites

My guess is that the property system wasn't designed with the idea of having controls linked, with some, but not all, hidden, so there may be no way around the flickering.

 

EDIT: From the video, everything looks fine. I don't see the flickering. Am I missing something, or is it something that isn't apparent in the video?

Share this post


Link to post
Share on other sites

The 'Rounded Rectangle' plugin has been updated. Now there is the possibility of synchronizing the four sliders without flickering.

  • Upvote 2

Share this post


Link to post
Share on other sites
2 hours ago, Eli said:

...Some trapezoid distortions would be also nice.:) 

 

 

Rotate / Zoom can do this. Also some plug-ins, such as Perspective Transformation, Quadrilateral Correction that runs much faster.

Edited by xod
  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, xod said:

but I don't know how to transfer the drawing to the pdn surface.

 

To create a Surface from the Bitmap:

bmpSurface = Surface.CopyFromBitmap(token.WorkBMP);

 

Note: the new Surface will have the same dimensions as the Bitmap.

 

If the Bmp Surface has the same dimensions as the Dst Surface, you can just do do this:

dstArgs.Surface.CopySurface(source, rois, startIndex, length);

 

If the two Surfaces have different dimensions, then you'll have to use something like GetBilinearSample():

            if (length == 0) return;
            for (int i = startIndex; i < startIndex + length; ++i)
            {
                for (int y = rois[i].Top; y < rois[i].Bottom; y++)
                {
                    if (IsCancelRequested) return;
                    for (int x = rois[i].Left; x < rois[i].Right; x++)
                    {
                        dstArgs.Surface[x, y] = bmpSurface.GetBilinearSample(x, y);
                    }
                }
            }

 

  • Upvote 3

Share this post


Link to post
Share on other sites

I don't know why my shapes are surrounded by white pixels.

 

LyIL2OD.png

 

 

 

Bitmap wrkbmp = new Bitmap(WorkBMP.Width, WorkBMP.Height);
WorkBMP.DrawToBitmap(wrkbmp, WorkBMP.ClientRectangle);

//make transparent
wrkbmp.MakeTransparent(wrkbmp.GetPixel(0, 0));

ShapesTool.zip

Edited by xod

Share this post


Link to post
Share on other sites

It may have something to do with anti-aliasing being enabled. I am not a coder so I have no idea what is needed to disable it in your script.

 

  • Upvote 1

Share this post


Link to post
Share on other sites

I used mediafire because the forum does not allow attachments of .zip files that exceed a certain size and because I don't like Dropbox.
Sorry about that.

Share this post


Link to post
Share on other sites

I don't have time to download and look through the code, but I think HyReZ is on the right track. It looks like the line is being antialiased against a white background, then the modified pixels are copied onto a transparent background. The white outline consists of pixels with partial coverage.  Since I don't know what you're doing, I can't say exactly what's happening, but I suspect it's something similar.

Share this post


Link to post
Share on other sites

I can't say how to fix it, but I do think that adding a threshold value to determine which pixels gets transparent should answer your problem.

 

x<threshold_value ? 0 : x

 

The above is what I thought on how to solve it. If it just a plain color, then it should return a plain color instead of original x image.

Edited by Reptillian

Share this post


Link to post
Share on other sites

I expect there's a better solution than adding a tolerance; something that fixes the underlying problem rather than patching it over.

Share this post


Link to post
Share on other sites

This 'ImageDistortion' plugin has been designed to be used with 'TextDistortion'.

Can be found in the Effects ► Distort submenu.

 

 

ImageDistortion.zip

Edited by xod
Replace with new version.
  • Like 2
  • Upvote 2

Share this post


Link to post
Share on other sites

2 great plugins individually ... even better together.

 

Never really played with Text Distortion but I think that's going to change.

Thanks

 

image-distort.png

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.