Author Topic: Full motion video  (Read 48458 times)

0 Members and 1 Guest are viewing this topic.

Offline Kawa

Re: Full motion video
« Reply #30 on: March 05, 2016, 03:22:28 AM »
It does not like PCX as is. Your CheckValid method cannot determine the size. If I skip it, it will generate the SEQ, but it is all scrambled. Also you cannot load PCX or GIF images in a .NET picturebox without a wrapper. I'll try to upload the project later tonight or tomorrow and you tale a look if you want.
What do you think I was trying to say?

Offline Collector

Re: Full motion video
« Reply #31 on: March 05, 2016, 03:01:50 PM »
I know what you said, I was just mulling over reasons for bothering with a wrapper.
KQII Remake Pic

Offline Collector

Re: Full motion video
« Reply #32 on: March 05, 2016, 03:09:01 PM »
Here is a current build. I have a git setup on Bitbucket. It is private for now. Anyone that wants access PM me an email for an invite.
KQII Remake Pic

Offline Kawa

Re: Full motion video
« Reply #33 on: March 05, 2016, 03:12:17 PM »
Why bother with a wrapper? Because System.Drawing doesn't like PCX and I like a challenge.

I wonder if one can get palette indices from a System.Drawing.Bitmap's image data... like, if you have an image -- a BMP, PNG, or GIF -- with three black entries in its palette, can you tell that this black pixel is color #2 and this other black pixel is color #3? Cos that's the kind of uncertainty that made me read BMP files by hand in this project.

Update: okay, so you can in fact get that data from a Bitmap, through LockBits of all methods. Nasty, and it only plays nice (and to our needs) on 8-bit images... but then why would you put a 4-or-less-bit image in there, hmm? But, the cool part is, besides the lack of PCX support, you can just load whatever System.Drawing supports and see if PixelFormat == PixelFormat.Format8bppIndexed. From then on, things like PNG/GIF compression and BMP being upside-down don't matter. So if I were to make a wrapper and add PCX support, I'd lockbit up a copy of the raw pixels for those three, and return the same manually for PCX.

Update: I now have a method that, given a filename, a 64000-byte target array, and an optional 768-byte palette array, returns the same right-side-up raw pixel data for any 256-color image that System.Drawing supports, plus PCX.
« Last Edit: March 05, 2016, 04:38:52 PM by Kawa »

Offline Collector

Re: Full motion video
« Reply #34 on: March 05, 2016, 05:36:18 PM »
For the GUI it needs to be able to be displayed in a WinForms PictureBox. Do you want me to just use the same email you used for the Wiki for the git?
KQII Remake Pic

Offline Kawa

Re: Full motion video
« Reply #35 on: March 05, 2016, 06:17:14 PM »
All but PCX can of course be used directly in a PictureBox simply by setting the relevant property to your Bitmap object:
Code: [Select]
pictureBox.Image = new Bitmap("frame.bmp");
Which inspires me to make a PCX-to-Bitmap method. Done.

Also, git doesn't like me.
« Last Edit: March 05, 2016, 06:26:21 PM by Kawa »

Offline Collector

Re: Full motion video
« Reply #36 on: March 05, 2016, 09:02:47 PM »
You don't have to setup git on your machine, but I send you an invite and you can download a zip of the project so we can be working from the same code.
KQII Remake Pic

Offline troflip

Re: Full motion video
« Reply #37 on: March 05, 2016, 11:02:02 PM »
Not sure which IDE you're using, but VS Community 2013 has pretty seamless integration with git.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Full motion video
« Reply #38 on: March 06, 2016, 03:41:14 AM »
I use 2010 Express primarily, but I got a copy of 2013, I forget which but it's the free one, to try and compile SCI Companion.

Offline Collector

Re: Full motion video
« Reply #39 on: March 07, 2016, 10:58:55 PM »
So, have you done anything with it? If you are not going to use the git, can I somehow get what you have have, so far?
KQII Remake Pic

Offline Kawa

Re: Full motion video
« Reply #40 on: March 08, 2016, 02:37:14 AM »
Mercurial is okay with me. But all I have is my little helper methods to grab the pixel and pal data, and to allow loading from PCX. I can put it right here later today if you want it.

Offline Collector

Re: Full motion video
« Reply #41 on: March 08, 2016, 12:26:49 PM »
Sure. Right now I am implementing a save file method, which I think might be nice to have for larger projects.
KQII Remake Pic

Offline Kawa

Re: Full motion video
« Reply #42 on: March 08, 2016, 12:43:08 PM »
Saving to what?

Offline Collector

Re: Full motion video
« Reply #43 on: March 08, 2016, 02:17:37 PM »
An XML file. Just to keep track of all of the input images and the order so you do not have to sort them every time you want to work on it or make changes.
KQII Remake Pic

Offline Kawa

Re: Full motion video
« Reply #44 on: March 08, 2016, 03:40:39 PM »
That's a good call. Incidentally, I have a JSON library that I wrote.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.037 seconds with 22 queries.