Jump to content

Unfinished plugins


xod

Recommended Posts

  • 2 weeks later...

^^ Love it! Seriously nice job.

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...
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

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

  • 3 months later...

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.

Link to comment
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

G'MIC Filter Developer

Link to comment
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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Can be found in the Effects ► Distort submenu.

 

 

 

 

Edited by xod
Replace with new version.
  • Like 2
  • Upvote 2
Link to comment
Share on other sites

Link to comment
Share on other sites

The new version made with OptionBasedLibrary.

 

 

 

 

 

 

 

Edited by xod
Replaced with a new version. Added more distortions. Try to use text instead of images.
  • Like 4
  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

This is an experimental plugin.
You need the two OptionBasedLibrary v0.7.9 files.


You can place it where you want by editing the Align+.dlc file.
In order to do that you need to change the extension to .txt

Open it with Notepad and edit the line:
AlignEffectPlugin.SubmenuName=your choise
Save and change the extension to .dlc

 

6OkvgBv.png

 

AlignPlus.zip

Edited by xod
Replaced with new version.
  • Like 2
  • Upvote 2
Link to comment
Share on other sites

This is nice @xod, but it overwrites the one you wrote with @MJW, which I use all the time.

The coding needs to reflect that you are calling it 'Align+'.

Thanks!  :)

Link to comment
Share on other sites

That shouldn't happen.

For testing I placed it in the Object submenu.
In my case, the new plugin does not overwrite the existing one.
You probably have a different version of Align Object than the official one.

 

g7YU2lN.png

Link to comment
Share on other sites

And you are correct @xod.  I have an older version of the plugin because it loads it directly under Effects, which is where I want it because I use it often. :)

 

Link to comment
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.

×
×
  • Create New...