null54 Posted July 14, 2013 Share Posted July 14, 2013 This plugin loads and saves Base64 encoded images. Only BMP and PNG format images can be saved. The format of the text file is UTF8. This plugin is compatible with Paint.NET 3.5.11 and 4.0.x. On 8/12/2015 at 7:45 AM, midora said: The file extension is .b64 A b64 file contains a png or a bmp image encoded as base64 text. Open a .b64: The filetype plugin decodes the text of the file back to the contained png or bmp image and then opens this image in paint.net. Save as .b64: The filetype plugin takes the open image, converts it to png or bmp (there is an option in the dialog), converts the result to base64 text and then saves the text. Download: Base64FileType.zip Source Code: https://github.com/0xC0000054/pdn-base64 4 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
jerone Posted July 14, 2013 Share Posted July 14, 2013 Great. Can you add a few setting to prepend the code with the correct base64 syntax "data:image/png;base64,". And maybe an option to build the HTML tag for an image or CSS for background image... Quote Link to comment Share on other sites More sharing options...
null54 Posted July 15, 2013 Author Share Posted July 15, 2013 Great. Can you add a few setting to prepend the code with the correct base64 syntax "data:image/png;base64,". And maybe an option to build the HTML tag for an image or CSS for background image... Added a Data URI format check box, HTML and CSS formats can be selected from a list. File version updated to 1.0.0.1. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
null54 Posted July 16, 2013 Author Share Posted July 16, 2013 Fixed a MIME type bug, file version updated to 1.0.0.2. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
midora Posted July 16, 2013 Share Posted July 16, 2013 What's about a raw option (just the BGRA data)? Quote Link to comment Share on other sites More sharing options...
null54 Posted July 17, 2013 Author Share Posted July 17, 2013 What's about a raw option (just the BGRA data)? Do you mean encoding the raw pixel data without saving as BMP or PNG first? Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
midora Posted March 1, 2014 Share Posted March 1, 2014 Sorry I totally missed your response. Sometimes I need a raw base64 BGR or RGB stream. But I can always use a tool to convert it. Two non-important issues: 1) If you are using file format BMP and set the HTML or CSS option then the loader part is not always able to load the file (you can also see this in the save dialog that the file size always tells "computing...". ) 2) If you are setting URI data type to HTML and then switch off DATA URI encoding then the Insert line break checkbox stays disabled. You first have to set URI data type to None. Seems to be a small issues with the IndirectUI rules. Quote Link to comment Share on other sites More sharing options...
null54 Posted March 2, 2014 Author Share Posted March 2, 2014 Both of those issues have been fixed, file version updated to 1.0.0.3. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
midora Posted March 2, 2014 Share Posted March 2, 2014 Thanks. But now in both cases (html and css) the plugin is not able to load and does not stop computing. >>The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. There is an other thing you may think about. It's about the extension. I would prefer that the plugin uses .b64 instead of .txt. In my case .txt conflicts with a plugin which loads .txt files as bitmaps. So I always have to decide what to install. Quote Link to comment Share on other sites More sharing options...
null54 Posted March 2, 2014 Author Share Posted March 2, 2014 Thanks. But now in both cases (html and css) the plugin is not able to load and does not stop computing. >>The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. There is an other thing you may think about. It's about the extension. I would prefer that the plugin uses .b64 instead of .txt. In my case .txt conflicts with a plugin which loads .txt files as bitmaps. So I always have to decide what to install. I cannot reproduce that error. As for the extension it would be en easy change. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
midora Posted March 2, 2014 Share Posted March 2, 2014 (edited) Maybe it depends on the file. So here is a file which is always showing computing (in 3.5.11 and 4.0) if HTML or CSS is selected. FLAG_B24.zip I verified that in both cases 1.0.0.3 is in the FileTypes folder. I would prefer the change of the extension. Especially because it is not a standard user file content. Edited March 2, 2014 by midora Quote Link to comment Share on other sites More sharing options...
null54 Posted March 2, 2014 Author Share Posted March 2, 2014 That issue is fixed, and the file extension has been changed. File version updated to 1.0.0.4. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
midora Posted March 4, 2014 Share Posted March 4, 2014 Perfect. Quote Link to comment Share on other sites More sharing options...
filmee24 Posted May 30, 2015 Share Posted May 30, 2015 Hi, can you add compression support? Quote Link to comment Share on other sites More sharing options...
null54 Posted May 30, 2015 Author Share Posted May 30, 2015 Hi, can you add compression support? What type of compression? Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
checho Posted August 11, 2015 Share Posted August 11, 2015 Hello, I am sorry, but how can I use this plug in to open an image from base64 string. I have added the dll to the plugins folder, but don't know how to use it. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 11, 2015 Share Posted August 11, 2015 This is a filetype plugin. It should be placed in the \Filetypes\ folder. You access the new file types via the list of extensions in the load/save dialogs. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
checho Posted August 12, 2015 Share Posted August 12, 2015 Thank you for your answer. Such folder did not exist, so I created it and placed the DLL inside: C:\Program Files (x86)\Notepad++\FileTypes, however, I don't see new option: http://screencast.com/t/OrU7lKK6rogC Furthremore, should I save the base64 string in a file and open it with this extension. And if so, what the file extension should be? Quote Link to comment Share on other sites More sharing options...
Red ochre Posted August 12, 2015 Share Posted August 12, 2015 Hi checho,I'm think the .dll goes into C:\Program Files\paint.net\FileTypes which should exist already.I haven't used this particular file type but that's where file type plugin .dlls usually go. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
checho Posted August 12, 2015 Share Posted August 12, 2015 You are right, my bad. I looked at the Nodepad++ folder Quote Link to comment Share on other sites More sharing options...
midora Posted August 12, 2015 Share Posted August 12, 2015 The description of the filetype is quite compact, I agree ;-) The file extension is .b64 A b64 file contains a png or a bmp image encoded as base64 text. Open a .b64: The filetype plugin decodes the text of the file back to the contained png or bmp image and then opens this image in paint.net. Save as .b64: The filetype plugin takes the open image, converts it to png or bmp (there is an option in the dialog), converts the result to base64 text and then saves the text. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 12, 2015 Share Posted August 12, 2015 The file extension is .b64 A b64 file contains a png or a bmp image encoded as base64 text. Open a .b64: The filetype plugin decodes the text of the file back to the contained png or bmp image and then opens this image in paint.net. Save as .b64: The filetype plugin takes the open image, converts it to png or bmp (there is an option in the dialog), converts the result to base64 text and then saves the text. Excellent summary Midora! I've added this to the first post. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
BoltBait Posted March 25, 2016 Share Posted March 25, 2016 I needed to save a file in b64 today (to embed it into a web page) and I thought I would have to download some spyware laden "freeware" program to do the conversion. Ugh. Then I thought... I bet someone has written a filetype plugin for paint.net! null54, thanks for making this plugin. It worked like a charm! Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
IRON67 Posted March 25, 2016 Share Posted March 25, 2016 (edited) I needed to save a file in b64 today (to embed it into a web page) and I thought I would have to download some spyware laden "freeware" program to do the conversion. Just for completeness: For that reason online converters exist like this one: https://www.base64-image.de/ Edited March 25, 2016 by IRON67 Quote Link to comment Share on other sites More sharing options...
BoltBait Posted March 25, 2016 Share Posted March 25, 2016 Hmmm... plugin may have a bug in it... I'm trying to do about 20 of these little images and I notice that many times when I go to save one, it will never show me the preview. It sticks saying, "(computing)" and never finishes. If I press Save when it is in this state, it never saves the file and I have to kill paint.net with the task manager. Can you look into it and possibly fix? The files I'm trying to save are small, 16x16 icons with some transparency which is why I can't use BMP format (which always seems to work). I've used it successfully to save larger images, so I'm not sure what the problem is. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.