I have need to use the Vector2.CatmullRom(...) method in a memory intensive program that currently produces extremely large pictures for testing purposes. I found the ability to do this on the XNA platform. Before adding this reference, I was able to create the pictures I need. Unfortunately, since I now have to compile a 32 bit runtime as that seems to be the only format for the XNA library, I do not have enough memory available to complete the task(s) necessary.
IS there a 64 bit version of this method in this or another library? I need the ability to turn blocky cardinal direction lines into smooth lines with easy slopes (which is why I am using this function).
I'm trying to make a small ASCII block graphics adventure game on Windows using the console terminal, and I am looking for example resources and tutorials on how to make a console window screen wrapper. I mean to change the resolution by changing the fontsize, and then just display simple graphics with ascii block character.
Any free tutorials, examples and resources will be greatly appreciated.
I am writing a fairly simple editor for managing video subtitle information(*). I do not touch the video itself, but use an external player (such as MPC-HC) to video in any of umpteen different formats.
It would be very nice if my editor could obtain the playing time for the video file, to bracket the timing of the subtitles. Some video editors write that into the NTFS attributes, but only sometimes, and only for some formats. I guess some formats provide it in metadata within the file, but again: only for some formats. And I do not want to spend weeks chasing duration info in this format, that format, and the third format...
Do you know of any library that can extract metadata info of this sort from "all" different video file formats? It certainly would not hurt if I could also extract e.g. fps value, video resolution etc.
I would need either source code or something that can be called from dotNet/C# - I am prepared to translate from e.g. plain C to C#. Obviously, I can pick up the source code for MPC-HC and extract that 0.1% of it that I need, but I am hoping for something requiring less work, less need to understand the structure of half a million code lines (or however large MPC source code is).
(*) regarding my desire to reinvent the subtitle editor wheel: I never found any editor suitable for handling multiple subtitle formats, and multiple languages, with the capability to generate a "concrete" subtitle file for lines spoken in specific language, subtitles in a specific languate. Also, I never saw good mechanisms for creating timestamped subtitles from scratch in an efficient manner.
LoadImage fails to open these files directly, even though I change their extension to bmp, because they are not in the format of bmp, but I know for sure that these are image files and they are convertible to bmp files. In other words, there is a way or algorithm to convert all these files to bmp files, so LoadImage succeeds and BitBlt renders the images to my window. But the problem is that I don't know how to convert these files to bmp files. When I invoke CreateBitmap function, to create new 32 bit BGRA bitmap, open them by invoking the CreateFile function, reading all their bytes to an array of bytes, also called "buffer", by invoking ReadFile function, then CloseHandle, then SetBitmapBits or SetDIBits, and finally BitBlt (after CreateCompatibleDC and SelectObject), I see unclear image on my window. Later I figured out that these images are 8 bit color, in the SPR files, the first byte is the width of the image, and the second byte is the height of the image, and the rest of the bytes are the pixels of the image, each byte for each pixel. MAP files are always 320x200 pixels image, so all their bytes are the pixels of the MAP image itself, the same as in the SPR files. When I read one byte, I set all channels of the bitmap to this byte. Then BitBlt renders the bitmap and I can see the image clearly, but it is grayscaled. But I want to see it colorful. When I use 2 bits for Blue, 3 bits for Green and 3 bits for Red, I see the image in the wrong colors. I know how it suppose to look like in DOSBox. I need help about how to convert and correct the colors, rather than shape. Shape is fine. I want to convert the SPR and MAP images to 32 bit BGRA colorful and not grayscaled bitmap. That's my purpose.
You cannot just read the files and expect the system to figure out what the content is. You need to reformat the data into proper bitmap structures before you can display them. See BITMAP structure (Windows)[^] .
The actual image data is simply color indexes arranged into horizontal scanlines. The mappings between color indices and 256 RGB colors is given in the PALETTE.DTA[^] file; Multiply the red, green and blue results returned by 4 to gain the full colour range.
If you don't have the palette file you can try to use the default palette provided in the link.
So you have to load the SPR file into memory, create a bitmap of the same size, and set the bitmap pixels to the RGB values retrieved from the colour table using the colour index from the SPR pixels.
I need help to Point me in the right direction.
At work they have asked me to create a program to read scanning data and then create a timber log in 3D based on the scanned data. And they need it in Direct X , not Open Gl or in WPF or something like that.
I have been searching and there pleanty of diffrent approaches with frameworks such as Unity and so on.
I would start this by gathering all the requirements and breaking them down. For instance, what format does the scanning data come in as (is it an obj file for instance)? Do you have to do this yourself or are you getting it from another source? It's always a mistake to think about what coding techniques you need if you don't have an idea about what it is you're being asked to build.
I have Everything well documented and i have a working solution to get scanner data. I get a list with the Diameters for every 2 cm of the log.
But my problems is how to approach the 3D.
Since they want me to do it in DirectX and not Open GL and they want me to select one of the frameworks out there such as Unity or any other.
The problem is that i have no clue what package to select ? Unity ?
Last Visit: 31-Dec-99 18:00 Last Update: 22-May-18 22:16