Jump to content

Joshua Bell

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by Joshua Bell

  1. Sorry, just thought to check back here now. From the email report, the error was: System.MissingMethodException: Method not found: 'Int32 PaintDotNet.Utility.ReadUInt16(System.IO.Stream)'. at PcxFileTypePlugin.PcxFileType.PcxHeader.ReadUInt16(Stream input) at PcxFileTypePlugin.PcxFileType.PcxHeader..ctor(Stream input) at PcxFileTypePlugin.PcxFileType.OnLoad(Stream input) at PaintDotNet.FileType.Load(Stream input) in d:\src\pdn\paintdotnet\src\Data\FileType.cs:line 459 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in d:\src\pdn\paintdotnet\src\Base\Functional\Func.cs:line 156 Per the above it was the use of Utility.ReadUint16(). If no-one else complained it's probably not worth changing. I've plopped the source up at: https://github.com/inexorabletash/PcxFileType/
  2. Just a note that I received a bug report that the PCX plugin wasn't working with PDN 4.0. I've tweaked it, seems to work, bug reporter is happy. Same link as usual in the top post. Side note: I still can't use the built-in FileType.Quantize method, because the plugin optionally allows (1) variable alpha cutoff support and (2) quantizing to a target palette. Bummer.
  3. Glad things are working for you! Sadly, I completely missed the Lights Out SF event - having a 5 year old is a bit distracting. However, we had a 6-hour power outage on our block a few weeks ago, so I'll call it even.
  4. FYI, Limerick's image has the following characteristics: PCX 3.0 (includes palette) 1-bit per pixel (i.e. monochrome) Included palette is all dark (so the image appears all black) Other sample PCX images that were v2.8-with-palette or 3.0 and 1-bit per pixel included a reasonable palette (i.e. black/white as the two colors). I suspect that other PCX loaders slam the palette to black/white for 1-bit images... so I've done the same. If Limerick's other images test out OK with the change, I'll post an update plug-in for download.
  5. Limerick: Hey - sorry to hear you're having trouble with the files and filter. Email me one of the PCX files that's not working for you and I'll see if I can figure it out. inexorabletash -at- hotmail -dot- com Renaux: Yikes, never saw this. DCX does indeed look like it would be fairly simple to support (http://www.fileformat.info/format/pcx/egff.htm) - I could treat each image in the DCX bundle as a PDN layer (and vice versa). It'd be strange when the images were different sizes, but that's probably rare in practice. If this is still of interest to anybody, let me know.
  6. Hrm... I probably should have looked at the new API sooner before 3.0 went final... but I was waiting for it to be final before taking a new dependency. D'oh! I had thought that the classes in the PaintDotNet.Data.Quantize namespace would just be made public. Instead, there's the new FileType.Quantize method. To support requests I've received via email (see above) I support two options - quantizing to an existing palette or dithering. So the PaintDotNet.Data.Quantize.OctreeQuantizer and PaletteQuantizer and PaletteTable are perfect. I'm not seeing how to do this via FileType.Quantize.... but it's late and perhaps I'm missing something.
  7. Bumping, so folks can see the revision to 0.9.2.0 - fixes to save code to actually compress the image. Details in the top posting.
  8. The ZIP is updated with a new build - this one has an option on save called "Use original palette". If checked, and if the document was originally loaded as a PCX (or as a PCX and saved as a PDN file, I think) then it will re-save using the original palette. The user who requested it reports "It works perfect now" so I guess it's behaving as desired.
  9. Duh, never mind, there's a PaletteQuantizer
  10. Someone emailed me asking if there was a way to ensure that when loading then re-saving, the same palette was used as when loaded. (E.g. if you have special needs like black/white as the first two colors or some such) The plug-in doesn't support this. I'm not sure of the best way to do this with Paint.NET's infrastructure. One approach might be to have the plug-in (1) annotate the document with the palette, and then on save either (2a) force-quantize to that palette or (2b) quantize and use the same pallette ordering only if they match. The source palette could probably be stuffed into user-defined metadata. From a quick glance at the Document/MetaData code this seems like it'd be supported, but it was a really quick glance. If there was an overload of Quantizer.Quantize() which took a Palette (of some variety) in lieu of calling GetPalette(), then approach #2a would appear to be relatively straightforward. Doable now by copying the source, but perhaps this could make it into PDN 3.0? (Other fancy things to do would be to have the save UI let you pick a pallette file and/or another image to load a palette from, but I'm not going there.) Any other thoughts? (And if anyone wants to beat me to this, I'm happy to share the source.)
  11. Cool. I'll recompile once 3.0 is officially released.
  12. Excellent! Deleting code is a good thing.
  13. I needed to muck with some PCX images. Searching the forum showed some other interest (http://paintdotnet.12.forumer.com/viewtopic.php?t=334), so I buckled down and wrote a plug-in for it. As I said over yonder (before Rick showed me the error of my ways): I've tested it on various sample images I could find online, but haven't used it thoroughly in content production cycles. Let's call this an early alpha. If anyone is interested in trying it out, e-mail me at inexorabletash@hotmail.com. After at least a few reports of it working I'll put the binary up somewhere for download. UPDATE: I've had enough positive feedback that I'll go ahead and post a direct download link: http://www.calormen.com/tmp/PcxFileType.zip Please let me know if you have any problems with it. UPDATE: A user kindly reported that the plug-in seemed to bloat the sizes of files on save (e.g. load a 16k image, save it at 300k). I investigated and it turned out that my code had a flaw such that compression would never occur. Oops. (Serves me right for wanting more of a file loader than a file saver.) I've updated the code to version 0.9.2.0, which is available for download at the above URL. Sorry for any inconvenience! UPDATE (2007-10-20): The plug-in is provided AS-IS, and is free for commercial and non-commercial use, and may be freely distributed. UPDATE (2007-10-22): Updated to 0.9.3.0. Now conforms to PDN 3.10 plug-in API so may require an update. Now forces monochrome (1-bit) images to black/white palette. UPDATE (2014-06-24): Updated to 0.9.4.0. Now works with PDN 4.0, so far as I can tell. Same download link as the above. UPDATE (2015-01-09): I may have mucked up the last ZIP. Anyway, rebuilt with .NET 4.5 requirement, republished. Otherwise, no changes.
  14. Nope, Ctrl+F4 * Alt+F4 closes the active window * Ctrl+F4 closes the active child-window or tab within the active window Try: * Opening up multiple workbooks in Excel, select Window : Arrange, Tiled, OK. Notice that you have two MDI windows now. Hit Ctrl+F4 to close the active one. * Open two images in PhotoShop. Hit Ctrl+F4 to close the active one. * Turn on tabbed browsing in IE7 or Firefox. Open two tabs. Hit Ctrl+F4 to close the active tab * Open multiple documents in Visual Studio or FrontPage. Hit Ctrl+F4 to close the active document.
  15. Now that PDN is acting like an MDI app (sorta-kinda), can the Ctrl+F4 accelerator be added as an alias for Ctrl+W ("Close Window")? This accelerator is standard both in traditional MDI applications and tabbed applications like Visual Studio and the latest browsers (IE7, Firefox, etc)
  16. I've written a PCX file type plugin for Paint.NET which supports: * Loading 1-, 2-, 4-, 8- and 24-bit color PCX files * Saving 4- and 8-bit PCX files The save path is based heavily on PDN's GIF file type handler. It uses the palettization code from PaintDotNet.Data.Quantize (a copy of the code shoved into a different namespace, since those classes aren't exposed) and the same UI (again, a copy; someday there might be more options). Rick: Can you make OctreeQuantizer public? I've tested it on various sample images I could online, but haven't used it thoroughly in content production cycles. If you want to give it a whirl, email me at inexorabletash@hotmail.com. If I get a thumbs-up from a few people I can stick the DLL/source up somewhere. (I'm happy to hand this over to anyone else who's interested.)
×
×
  • Create New...