Jump to content

jamesn

Newbies
  • Posts

    4
  • Joined

  • Last visited

About jamesn

  • Birthday 01/01/1970

jamesn's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Not too sure its supposed to work like that. Its an Image Editor, not an Image Processor. It would be a lot of work to change it like you want.
  2. When calling it as a class you need to add it to the project first. There are other parts you need to add to make it work also, but it can be done. Dim pdnEdit As New PaintDotNet.MainForm pdnEdit.Show() Although it's not a component, some parts will work ok. Some parts dont. When using it this way though you are on your own as its not meant to work like this. Also, as far as i know, it is the only good image editor which you can/could include in a project. The others are very limited and quite expensive. Even though, if you had to pay for the PDN source I am sure i would. Good luck.
  3. This is what i did. I was saving it to a webservice as a byte[] and then saving the byte array to sql. I also flattened the image first, which was the same way the current save works. This was all done in a dialog box, as i wanted the code to be eay to upgrade later on. All i have to do it create a new save item and call the dialog passing the document to it. I also have code to get a picture from SQL and place it into a new document. The way the paint.net guys have done the code makes it really easy to move the images in and out of sql. private void SaveWSImage() { try { // flatten the document Document mydoc = privDoc; System.IO.MemoryStream myoutput = new System.IO.MemoryStream(); using (Surface surface = new Surface(mydoc.Width, mydoc.Height)) { surface.Clear(ColorBgra.FromBgra(255, 255, 255, 0)); using (RenderArgs ra = new RenderArgs(surface)) { mydoc.Render(ra, true); } using (Bitmap bitmap = surface.CreateAliasedBitmap()) { //LoadProperties(bitmap, myinput); bitmap.Save(myoutput, System.Drawing.Imaging.ImageFormat.Png); } } WebService1.Images ws = new WebService1.Images(); byte[] oFileByte = myoutput.ToArray(); ws.SaveImage(oFileByte, System.Convert.ToString(oFileByte.Length)); // } catch { } }
  4. You can do this by recompiling paint.net as a class library. Then you can add the .dll's to your vb project. Then to open paint.net you can reference the class and call mainform.
×
×
  • Create New...