Jump to content

Fisherman's Friend

Members
  • Posts

    468
  • Joined

  • Last visited

Everything posted by Fisherman's Friend

  1. One request: When you use twist or "twist +" with selections, it uses the entire pic to detect the center. Can there be a checkbox for using the whole twist only on a part of the image? (I mean that the center of the twist is not in the center of the entire picture but in the center of the selection.) I could imagine there are problems when the selection is rather complex, but developers are used to fight, aren't they...? Another option would just be to make the center of the twist moveable (x/y axis).
  2. Thanks Madjik, yesterday I was angry about the normal twist effect...
  3. Hmmm... Maybe the planned changes to the plugin system (3.20) will affect this issue in a positive way...?
  4. Of course you have reasons, and I respect them. The point is on the one side that I want to see what's in dlls I get, one the other side it's just fun. Is rotate zoom now not more usable with script lab?
  5. I think this should be the way. Fot the beginning, a simple plugin is enough.
  6. Heh, heh... Neither me nor my friends are jobless and have the time to play with effects for 2 hours. Also you can use both versions, you only have to close PDN and change the dll. And now enough! Regardless who uses it or doesn't use it, this plugin is great work and it's thread shouldn't be used for pointless discussions.
  7. I never would as I have found no other usage for scripting than sharing "the steps" with friends at the moment. So you won't hear a word. Seriously. :wink:
  8. That's the reason why I keep old versions of plugins.
  9. I don't hink we'll get a tool for it. So we should concentrate on a plugin. Would be easier I think, too.
  10. @ Rick: I don't know if it's a help, but here you see a large amount of these files, maybe it helps you to write the code for deletion (names etc.):
  11. Rather scary as I made a working dll with codelab using exactly this code without changing a word. I think you have to select the color that has to get masked (don't hit me if I'm wrong).
  12. Yeah, indeed. The sad thing for me is that my poor powers of observation will never match your kindness and maturity by far.
  13. OK, let's try. I searched my PC and found a doc (not rtf :wink: )called "chroma masking" and I believe this is it. I don't nkow about differences between alpha and chroma masking, but maybe the code will find usage in any case. Don't get confused by the plugins listed on top of the code, I think the code is only based on these plugins. The entire code is not my work. If any of the authors does not want to have it here, please write it or PM me or a mod, I will remove it as fast as possible. /* * /! Warning, this is GPL code! * Color2Alpha Paint.NET plugin by Bibinou based on : * Color To Alpha plug-in v1.0 by Seth Burgess & others, 1999/05/14 * The GIMP -- an image manipulation program * Copyright (C) 1995 Spencer Kimball and Peter Mattis * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ void Render(Surface dst, Surface src, Rectangle rect) { PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); long CenterX = (long)(((selection.Right - selection.Left) / 2)+selection.Left); long CenterY = (long)(((selection.Bottom - selection.Top) / 2)+selection.Top); ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra CurrentPixel = new ColorBgra(); double red, key_red, green, key_green, blue, key_blue, alpha, maxalpha; int rnew, gnew, bnew; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; red = CurrentPixel.R ; green = CurrentPixel.G ; blue = CurrentPixel.B ; key_red = PrimaryColor.R ; key_green = PrimaryColor.G ; key_blue = PrimaryColor.B ; /* Store red alpha component */ if (red >= key_red ) alpha = (key_red == 255 ? 0 : (red - key_red ) / (255 - key_red) ); else alpha = (key_red == 0 ? red / 255 : 1.0 - red / key_red ); maxalpha = alpha; /* Store green alpha component, if greater */ if (green >= key_green) alpha = (key_green == 255 ? 0 : (green - key_green) / (255 - key_green)); else alpha = (key_green == 0 ? green/ 255 : 1.0 - green / key_green ); if (alpha > maxalpha) maxalpha = alpha; /* Store blue alpha component, if greater */ if (blue >= key_blue ) alpha = (key_blue == 255 ? 0 : (blue - key_blue ) / (255 - key_blue )); else alpha = (key_blue == 0 ? blue / 255 : 1.0 - blue / key_blue ); if (alpha > maxalpha) maxalpha = alpha; /* Threshold the alpha */ //alpha = (maxalpha * 255) / pvals.threshold ; /* Using int to Math.Round the values */ if (alpha > 1) alpha = 1 ; else if (alpha < 0) alpha = 0 ; if (alpha > 0) { rnew = (int) ( Math.Round( (red - key_red ) / alpha + key_red ) ) ; gnew = (int) ( Math.Round( (green - key_green) / alpha + key_green ) ) ; bnew = (int) ( Math.Round( (blue - key_blue ) / alpha + key_blue ) ) ; } else { rnew = (int) red; gnew = (int) green; bnew = (int) blue; }; if ( rnew <=255 && gnew <=255 && bnew <=255 && rnew >=0 && gnew >=0 && bnew >= 0) { CurrentPixel.R = (byte)rnew ; CurrentPixel.G = (byte)gnew ; CurrentPixel.B = (byte)bnew ; CurrentPixel.A = (byte)(alpha * 255) ; dst[x,y] = CurrentPixel; } else { dst[x,y] = src[x,y]; } } } } } /* EOF */
  14. I don't think I'm allowed to do this due to the plugin share rights. Maybe I could post the code. I think I pasted it into a rtf document, the question is if I would find it (assumed that I still have it). What I don't know is if this is the right place to post it.
  15. No, I know all plugins available. Long time ago there was a topic about masking. I can't find it at the moment, I believe it was in GD. Someone requested masking and then a discussion started (if I remeber right). Some users created rather a sketch of code (codelab). I pasted it into codelab and compiled a dll. It worked not that good (but it worked), and as I said, it was not developed further. Seems it died out.
  16. Weren't there attempts of a masking plugin once? Another thing which wasn't discussed or devolped further...
  17. Of course I know what's discussed about "advanced". That was only a new attempt to get rid of one submenu. I don't know why I'm so into this as time will bring me victory. When I reached the point that I only have 4/5 submenus but all plugins via 3.20, I have to block my access to my money as there is the massive danger that I would donate all of it because of my deep feeling of satisfaction... However, the reason for my post was mainly the code issue.
  18. Thank you, Rick. Actually I waited for you to comment. I agree, it's definately low priority, but it's nasty. Do you mind telling us why it's so easy to fix (I mean what causes the error)? Nothing important, I'm just a little curious.
  19. Is this "codelab code"? I get errors at line 13 (wrong token) when I use it with codelab... How about moving all steganography effects to the new "advanced" submenu?
  20. Forgive me, Bob. I didn't get that you mean scanning with antivirus software. I thought you meant I would scan running anitivirus stuff in the background. You see, I have these moments too. To make this clear, I speak about Paint.Net (of course) and so I mean picture scanners (hardware, not software). My thread targets a bug (?!) of the picture scanning parts of PDN. I'm sorry for the confusion with WIA. I first thought the bug would be related to WIA but I did scans with other software using WIA and did not get junk files. I should have checked it before posting the first time. Sorry. Yes, I had the same idea yesterday but I hadn't the time. Now for your interest: This is the Hex view of one such file (it shows the raw data) and as you can see it is totally empty. And the file size isn't just 0 KB, it is 0 byte. Also I attached three of these files. It are different scans. You can download them and look yourself. Note: It was impossible to upload the files, as it said: "The file is empty, you can't upload it" or something like this. So I made a Zip. Bob, HITMAN-X-, I thank you both for your fast replys. Actually, I don't think this is stuff for you. It's intended as information both for users and the developers. I still don't know if the bug is either related to PDN or to .Net, and maybe I'll make a batch file for killing all img*.tmp-files in Temp. But even with the batch, it is still nasty as you can't scan using Paint.Net without doing cleanups after scanning. I have not to say I would be lucky about a fix. If somebody has any further information, he is definately invited to post here. I myself said anything I have to say, but I'll answer questions if it helps. Thank you for your time. imgs.zip
  21. Yes. Thats the purpose of that directory. And please note it's named Temp. If I wouldn't clean it manually, the junk files would stay there forever. So you delete important files once per weak? :shock: The compression seems to be unique as the files are empty and 0 KB in size. For me it's as I said, I think it's a bug, and I just wanted to post that bug. I don't see any possibility for a kind of workaround. Maybe it's related to .Net Framework and not directly to Paint.Net. However, I hope this will be useful to other users so they know they have to do cleanups.
  22. I think the PDN jpeg interface is fine and what you say regarding the preview checkbox is correct. Perhaps you should mind providing an "advanced" button, so the users can select themselves if they want a simple and easy to understand interface or more and better options. A program like PDN should provide more options than just one 0-100 slider for jpeg which is so widely used and has so much possible options. In fact, GIMP allows to save improved jpegs smaller in size and better in quality. Today as PDN has made so impressive steps since the first public builds, an update to the jpeg interface is recommended. The GIF-interface provides already quite some options, I don't get why the one of jpeg should not. But maybe someone would be interested in making an "advanced jpeg" file type plugin providing the things asked?
  23. OK, several test were done with MS Paint and Xnview, both using WIA. No files were left in the temporary folder. Did the same with PDN (same scanner, same pictures) and got imgXX.tmp-files. In my opinion this is obviously a bug.
×
×
  • Create New...