Jump to content

jchunn

Members
  • Posts

    149
  • Joined

  • Last visited

Posts posted by jchunn

  1. Hmmmm... I hadn't thought of that either.... good point about the y,x vs. x,y given the way the "rois" are passed in. While in theory, I had been focusing on the point that you cannot make assumptions about how the rois are passed in, I have observed that they are always (in my testing so far at least) are horizontal slices, very long in the x direction and very short in the y direction. Thanks for the tip.

  2. This should go into the Distort menu, not the Object menu.
    You mean Render, don't you? This plugin doesn't distort the existing pixels, it overwrites them with new information.

    Actually, it "blends" with the existing pixels.

    I debated with myself over which menu it should go in, between distort and render... and I see merit to both options, but I am leaning towards distort, only because that is where "Tile Reflection" is, which is probably the closest thing to this plugin among the built in effects.

  3. Ok, I have spent some time learning the plugin model to prove that plugins can be written for Paint.Net using Visual Basic.Net. Apparently, they can.
    They can be programmed in pretty much any .NET language. A quick search coulda told you that :P

    Yes, and I did do that search, and I did find those comments, and I knew it already, being an avid .net programmer... but Rick and some others had suggested that it "should" work in vb.net, so I set out to prove it... just for kicks. I have not seen any posts or plugins saying it had already been done, but I'm sure I could have missed it.

    Regards.

  4. MODERATORS NOTE:  this plugin has been superseded by a newer version:

    https://forums.getpaint.net/topic/112488-varicose-2-ymd18-02-20/

     

     

    Download here

    Ok, I have spent some time learning the plugin model to prove that plugins can be written for Paint.Net using Visual Basic.Net. Apparently, they can.

    I am posting this here in hopes that some of you "gurus" will play with it and make suggestions. I am no graphic artist... I am a programmer, so if anyone finds this effect the least bit useful, I would LOVE to see any creations that use it.

     

    And here is the source (zipped)

    PDNPI_IndirectUI.zip

    Enjoy,

    Jesse Chunn

  5. I have been playing with the effects api for a couple of days now... just trying to get something to work (and I have gotten something to work). I would deeply apprreciate it if somebody wouldn't mind taking a minute to review my comments below and provide some insight. Some of the folks here have obviously created some astounding plugins, and I think one of those folks could reply to this with their eyes closed. I have read through the forum, and I have toyed around with some of the plugin source that is available, but I am still not completely sure I have this right.

    Please correct any incorrect assumptions here:

    The "rois" variable (rectangles of interest, I presume) that is passed into the "OnRender" method appears to be at the heart of the multithreaded model. When the method is called, it looks like one or more rectangles are passed in via this "rois" array, and it looks like the expectation of the application is that the plugin will process the areas contained in the "rois" that are passed in, and only those areas, during that pass. It also appears that the "OnRender" method will be called multiple times for a single rendering, passing in different "rois" until the entire selected area (or is it the entire surface of the layer?) has been covered.

    If I am correct so far, then it appears that this must be looked at from the perspective of the "location" of each rectangle. In other words, the plugin could be asked to render an arbitrary location within the overall selection (although I assume logically that they are passed in from top to bottom?). The plugin, then, must use the location of the rectangle (and the pixels within that rectangle) relative to the overall selection or the overall layer, depending on what your plugin does.

    Again assuming I am right so far, then the x,y location of a pixel must be used in any math that determines how the effect acts on that pixel. While that is obviously true even in a single threaded implementation, the point is that you cant really use other variables within a loop (like i, for example) in the math, at least not easily, since i would start over at zero in each pass (unless, of course, you use relative position to set the initial value of i).

    I am just trying to verify how this works. My testing this far seems to verify what I have said, but I don't want to get too far along only to find that I have misunderstood something. Any commentary would be greatly appreciated.

    Regards.

  6. Another answer - just try:

    void Test()
    {
       Image image = new Bitmap(16, 16);
       Graphics G = Graphics.FromImage(image);
       G.DrawLine(new Pen(Color.Red), 8, 1, 8, 2);
       image.Save(MyBitmap.bmp);
    }
    

    I'm not sure what you are trying to say here. The code you posted specifies the following:

    Line Starting point: 8,1

    Line Ending point: 8,2

    None of the arguments provided to the Drawline method specify "length", they are x,y coordinates for the beginning and end of the line (x1, y1, x2, y2).

    As for the tree analogy...

    Tree = border of a pixel

    Space between trees = pixel

    100 "trees" would be 99 "spaces", right?

    If that is true, then 3 "trees" would be 2 "spaces", right?

    If that is true, then a line on the screen that has a length of 2 would have 3 "trees" (or borders) and 2 "spaces" (or pixels), right?

  7. I would have to agree that if a line "contains" two pixels in its' length, it is two pixels long.

    A ruler is 12 inches long... it is measured from the beginning of the ruler to the end, and "contains" 12 full inches... you don't start from the end of the first inch.

    Other graphics programs measure length in those terms. That does not mean that this is not by design, but if it is, it is less intuitive to me than I would like.

    Just my two cents. The author of the software may have a reason for this that I am unaware of.

  8. When I try to open some images (by clicking the "open" icon on the toolbar or using the file-> open menu), I get the file-open dialog, select a file, click the "open" button, and PDN locks up (screen does not respond to mouse, does not repaint) for about 45 seconds or so, then it gives me a message stating that PDN has experienced an error and must close... and I should refer to the pdncrash.log on my desktop.

    The application has been working fine and opening images fine for the two weeks or so that I have had it. I have mostly been creating images from scratch, so I can't say exactly what percentage of open attempts result in this issue. I have opened several images successfully, for sure, so it does not always do this.

    I am attaching an image that it has happened on several times. I tried to attach the log file, but for some reason, the forum wouldn't let me, so I am pasting it below. I DID reboot and try to open the attached file immediately afterwards, and still had the problem, so I don't think it is a corrupt memory issue (suggested in the log), since I didn't do anything to corrupt any memory (unless it is PDN that is corrupting the memory when trying to open this file?).

    This text file was created because Paint.NET crashed.

    Please e-mail this file to paint.net@hotmail.com so we can diagnose and fix the problem.

    Application version: Paint.NET v3.22 (Final Release build 3.22.2933.24445)

    Time of crash: 1/28/2008 9:48:50 PM

    Application uptime: 00:01:44.6562500

    OS Version: 5.1.2600.131072 Service Pack 2 Workstation x86

    .NET Framework version: 2.0.50727.1433 x86

    Processor: 2x "Genuine Intel® CPU T2300 @ 1.66GHz" @ ~1672MHz (SSE, SSE2)

    Physical memory: 1014 MB

    Tablet PC: no

    Updates: true, 1/27/2008

    Locale: pdnr.c: en-US, hklm: en-US, hkcu: n/a, cc: en-US, cuic: en-US

    Loaded assemblies:

    mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll

    PaintDotNet, Version=3.22.2933.24445, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.exe

    System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll

    System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll

    System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @ C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll

    PaintDotNet.Core, Version=3.22.2933.24442, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Core.dll

    PaintDotNet.Base, Version=3.22.2933.24440, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Base.dll

    PaintDotNet.SystemLayer, Version=3.22.2933.24441, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.SystemLayer.dll

    PaintDotNet.Resources, Version=3.22.2933.24441, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Resources.dll

    PaintDotNet.Data, Version=3.22.2933.24442, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Data.dll

    PaintDotNet.Effects, Version=3.22.2933.24443, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\PaintDotNet.Effects.dll

    CodeLab, Version=3.20.2933.30843, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\Effects\CodeLab.dll

    Feather, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\Effects\Feather.dll

    stdWoodTexture, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\Effects\stdWoodTexture.dll

    Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @ C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll

    System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @ C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll

    DdsFileType, Version=1.11.2933.24444, Culture=neutral, PublicKeyToken=null @ C:\Program Files\Paint.NET\FileTypes\DdsFileType.dll

    Exception details:

    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    at System.Windows.Forms.UnsafeNativeMethods.GetOpenFileName(OPENFILENAME_I ofn)

    at System.Windows.Forms.OpenFileDialog.RunFileDialog(OPENFILENAME_I ofn)

    at System.Windows.Forms.FileDialog.RunDialogOld(IntPtr hWndOwner)

    at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)

    at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)

    at PaintDotNet.SystemLayer.ClassicFileDialog.<>c__DisplayClass3.b__1(IWin32Window modalOwner)

    at PaintDotNet.SystemLayer.UI.<>c__DisplayClass4.b__0(Object sender, EventArgs e)

    at System.Windows.Forms.Form.OnShown(EventArgs e)

    at System.Windows.Forms.Form.CallShownEvent()

    at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

    at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

    at System.Threading.ExecutionContext.runTryCode(Object userData)

    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

    at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

    at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

    ------------------------------------------------------------------------------

    12758_9be180b6110ade050978d01c1ac148a6

  9. Nice tutorial for a beginner like me (pretty good with Image Composer, but this is my first try with PDN).

    Since the post was called "How to make ... Insides", I was going for something that looked kinda like what "muscles" look like if you peel back skin.

    Applying "sharpen" a few times gave me the texture I was after.

    insides.jpg

×
×
  • Create New...