Jump to content


Photo

.Exe FileType Plugin


  • Please log in to reply
7 replies to this topic

#1 Illnab1024

Illnab1024
  • Members
  • 1,300 posts
  • LocationMiddle Tennessee
  • Reputation:5

Posted 31 May 2012 - 12:13 PM

Just relaxing, decided to make this for fun.

Posted Image

Hidden Content: C# source


Hidden Content: c++ source


Download: Attached File  DotExeFileType.zip   5.67K   87 downloads

(Edited: Messed up the 'ratio' variable)
~~

#2 nitenurse79

nitenurse79

    2012 Signature of the Year Award Winner

  • Members
  • 1,132 posts
  • LocationSweden
  • Reputation:120

Posted 31 May 2012 - 08:47 PM

How does this exactly work?

signaturewithcurl_zps4c5b278b.png

Sig battles won 17. Image battles won - 2


#3 Illnab1024

Illnab1024
  • Members
  • 1,300 posts
  • LocationMiddle Tennessee
  • Reputation:5

Posted 31 May 2012 - 09:27 PM

How does this exactly work?


In the DLL there's an embedded resource with the .exe produced by building the C code. That executable has a static array from `const CHAR_INFO outChar[80][25] = { { {L'0', 0xf} } };` which is printed directly to the console using ConsoleWriteW. The Plugin writes that .exe to file but writes over the static array inside the executable to change the "image" that gets written to the console.

It's just a "for-fun" plugin; there's absolutely no point to saving an image as an executable file, and even though you could do it as a full-color bitmap and use Windows GDI stuff to display it, that's also pointless when there's Windows Photo Viewer. If I really wanted to have fun, I'd do a 16-bit .COM FileType using int 21 stuff, but I'm on a 64-bit system, so meh.
~~

#4 pyrochild

pyrochild

    Plugin Author of the Year 2012

  • Administrators
  • 11,273 posts
  • LocationColorado
  • Reputation:137

Posted 31 May 2012 - 09:45 PM

Haha what even

This is awesome and useless.
sig8.png
[I write plugins and stuff]

If you like a post, upvote it!

#5 Rick Brewster

Rick Brewster

    Paint.NET Author and Developer

  • Administrators
  • 12,609 posts
  • LocationKirkland, WA
  • Reputation:125

Posted 31 May 2012 - 10:38 PM

Weeeeeee

Attached Thumbnails

  • lolwat.png

The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html

Posted Image

#6 nitenurse79

nitenurse79

    2012 Signature of the Year Award Winner

  • Members
  • 1,132 posts
  • LocationSweden
  • Reputation:120

Posted 01 June 2012 - 08:33 AM

Just had a play with this, it is as pyrochild says "This is awesome and useless"

@Rick Brewster nice example :)

Fun to be had :)

signaturewithcurl_zps4c5b278b.png

Sig battles won 17. Image battles won - 2


#7 midora

midora
  • Members
  • 355 posts
  • Reputation:19

Posted 01 June 2012 - 11:25 AM

Useless? Maybe, but it could also be the base of a stand-alone slideshow using embedded images.
Posted Image

#8 qwertyuu

qwertyuu
  • Members
  • 100 posts
  • LocationQuebec (Canada)
  • Reputation:2

Posted 27 July 2012 - 01:08 AM

I think I'll actually process a whole wallpaper in this, and turn THAT into my wallpaper
could be nice enough!

Posted Image