|
This is not a C# question. Nor is it a Graphics question.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
dx1 = u - x1 - x1^3
dx2 = -x2
how to make a diagram to analyze the bifurcation of the function
P.S. the x-axis of bifurcation is u
the y-axis of bifurcation is || X ||
{the amplitude (or norm) of the equilibrium point }
|
|
|
|
|
As a warmup for a more complex project, I had started to test doing layouts and rendering of text with DirectWrite. And for a start, I had used the snippets from the Microsoft Dev Center and created a complete minimal test application in my Visual Studio 2015 with Windows 10.
The good part is that I had some rendered text as a result in my window. The bad part is that the result (see this this screenshot) is far away from good readable text.
My understanding of the relating MSDN documentation is that ClearType is enabled by default. The title bar text of the window is obviously set up with text in ClearType. I guess I missed some setting in the DWrite factory but I do not know which one.
Does anybody have an advice for me?
For anybody who wants to take a look at my application: The project can be found here as ZIP file. The coding of my test application was not thought to be an example for a well structured program; its sole purpose was to find out how text rendering in ClearType could be accomplished.
(A short note: I had originally posted this in the Managed C++/CLI forum, and I received the advice that I might be better off in this forum. So I modified my test into a minimal C++ application - with the same sad result -, and I am reposting it here)
|
|
|
|
|
Nowadays most video editors are desktop-based application and there are just a few that's run online, like WeVideo. While it seems that there isn't one that's used for professional movie editing team like Industrial Light & Magic to produce a large-scale commercial movie. Actually I'm interested in doing researches on this area in my MPhi/PhD study. I want to know what's the main challenge of implementing such kind of online video editors. Is there some possible solutions to it?
|
|
|
|
|
I would think the biggest obstacle to an online video editor would be the huge demands on bandwidth, especially for uploading the raw footage to be edited.
I've shot a lot of standard definition DV over the years, and it runs to about 13GB/hour. For a 20 minute video I'll use, on average, maybe 3 or 4 hours of raw footage (and sometimes much more). Uploading over 50GB of data on a typical home connection is going to take a very long time. I've also recently moved up to HD recording, which requires considerably more space, and would require even longer uploads.
Editing is also a very interactive process, which would require not only very high performance servers, but very good downstream connections to see the results as you edit. When editing, I'm continually zipping back and forward on the timeline, adjusting clips, moving things, changing audio streams etc. etc., and I want instant feedback with no stuttering or "buffering...".
The 'WeVideo' site looks interesting, but even on the 'Professional HD' level it provides virtually no storage, and a very limited amount of published video. What little they show of the editing tools doesn't impress either. It's probably not going to be useable for anything other than very simple, very short features.
Some day, when we all have fibre-to-the-home, it might be possible, but currently I'd say it's not practical.
Days spent at sea are not deducted from one's alloted span - Phoenician proverb
|
|
|
|
|
molesworth wrote: Some day, when we all have fibre-to-the-home
Perhaps, on that day, we would also have a new definition of HD, practically resulting in a similar scenario as today.
|
|
|
|
|
The problem is bandwidth.
If you can separate the presentation from the actual editing, then you will make progress.
Almost all (video) editing is done interactively. Create a server that can process "edit" commands from any source.
The file to be edited would need to be uploaded to the server and downloaded when complete; you may still be running a "desktop editor", but now it is running on a server.
Any "terminal server" (e.g. Team Viewer; remote desktop) will do; the "editing software" can be anything the user prefers (Movie Maker; Nero).
I have a quad-core development machine in my office running Windows 8.1.
I also have single-core 7 year old laptop (running Vista) that is almost useless except when I use it to "remote" into my development machine. When connected, I can run the latest Photoshop, Visual Studio, etc. without any issues.
So, while the Vista laptop won't support the latest releases of IE and Visual Studio (and would grind if it did), it does work very effectively via a remote connection to my development machine.
Terminal servers have come a long way since the days of Norton's PCAnywhere.
|
|
|
|
|
I'm quite interested in building a model of the black hole and visualize it like that shown in the movie "Interstellar". I'm good with C/C++/C# and Windows programming, how can I make it?
|
|
|
|
|
|
|
Hi all. I'm sorry, I know that this is going to come out as a "gimme codez" kind of question, but there's nothing much to do about that.
The thing is: I want to paint a brushed metal knob on my Winforms form surface (using C#) - Similarly to what what is mentioned in this Photoshop article[^]. (I'm only interested in the surface itself. All the trimmings around it are easy enough to paint)
I could just embed an image in the application and paint it from that (and that's probably what I'll do if I can't find any other solutions), but I would rather that the code didn't rely on embedded resources.
I guess I can figure it out somehow, but if anybody knows of any links/tips on how to do it, it would save me a lot of time.
I have tried Googling, but either my Google Fu is not strong enough or there are no such tips out there on the entire web.
So If anybody happens to know and can point me in the right direction, I would really appreciate it...!!!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
|
Thanks a lot Richard
Yes, I assume so, but it seems quite hard. Either you have to make up a gradient with a he** of a lot of gradient stops or you have to paint it in several layers. I guess I was hoping that somebody had already walked the long road so that I could just do what we programmers love the best: Cut and paste...
But if not, I might start messing around with gradients (and if I get it right, I can always publish it here). It might turn out a lot easier than it first appears, who knows? Or I could just do the fast hack and paint it from an image file as mentioned... Haven't quite decided yet.
Just to clarify: The purpose of this question is not so much to get around it as easy as possible as it is to save valuable project time...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
modified 20-Aug-15 4:25am.
|
|
|
|
|
I'm sure that I have seen some WPF article on this, but cannot recall where. If you can find it you may be able to convert to C# (try Sacha Barber[^]'s articles). There is also an alternative for creating these images called "ray tracing", but if memory serves, it is also quite labour intensive.
|
|
|
|
|
Another way to achieve this would be to use a Pixel shader and render in the completed image. While this[^] sample is in GL Shader, it is close enough that you could convert it into a DirectX shader.
|
|
|
|
|
Thanks Pete, I'll have a closer look at that!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
I have a deck of Elder Futhark rune cards I hand drew myself some 25 years ago. On a large paper card on a drawing board. Back then Google was the belated Messiah, and online services such as rune drawing or font composition where very scarce. I did it all my little old self with a T-square, ruler, pencil, and other such steam-punk devices.
Having rediscovered the deck, I find the accuracy and attention to detail I put into each card remarkable; runes are drawn with black koki pens, on white card; the uniformity of line thickness close to perfect on most cards, and the points where lines meet have zero smudge or overlap, or whatever. These look, except for one or two, like they were printed.
I want to capture all these cards for part of a digital work, and because the cards have aged some 25 years, their edges are not perfect, although each card is still a very good 80mm x 100mm. I scanned sets of six cards, in a grid style, on A4 paper, and used a white brush to remove edge markings and other unwanted spots from the cards. I now have six perfect enough composite images of 5670mm x 4730mm (3 cards wide, 2 deep on each image). These 'final' images are all nearly perfect size to be divided into 6 smaller images, that make up the large ones, So, from 5680mm wide, we get three cards 1890mm wide, and from 4739mm wide I get 2 2365mm cards.
Now, how do I do this? Using a selection rectangle in Paint.NET is not for the feint of heart, and not much ambition for this task. I have done an incredibly lot of google research before asking here, but nearly all results advised I use the ImageMagic [^]convert command. I have tried several variants of the convert command to no avail, e.g. one gives a very small image out but still containing all six original images. Various other attempts here met with similarly strange results.
The basic command I\m trying to use is: convert 'LargeImage.jpg' -resize 120x120 thumbnail%03d.png
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
modified 12-Jul-15 6:51am.
|
|
|
|
|
Sounds like you're looking for the crop command[^].
The width and height of the geometry argument give the size of the image that remains after cropping, and x and y in the offset (if present) gives the location of the top left corner of the cropped image with respect to the original image.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
So I would effectively, on card at a time, crop the whole drawing down to one-card size, save that card size drawing under a new name, then recalculate the offset for the next card, 24 times. No great effort if I get the process right once to start with. Thanks.
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
You should be able to do it with a single -crop command:
You can add the @ to the geometry argument to equally divide the image into the number of tiles generated.
convert -crop 120x120 LargeImage.jpg tiles/tile%03d.jpg
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Here's a link to the ImageMagick documentation for the crop command.
From a quick look it will do exactly what you want.
Link added: http://www.imagemagick.org/Usage/crop/[^]
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
modified 13-Jul-15 9:08am.
|
|
|
|
|
What link?
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
Sorry, I added the link!
Our office is out of coffee and I just came back from a three week vacation.
Now where's that switch to turn my brain back on?
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
I successfully create a custom cursor from a 32x32 32bpppArgb (GDI) Bitmap with the following code:
public static Cursor ToCursor(System.Drawing.Bitmap bmp, byte x, byte y)
{
var stream = new MemoryStream();
var hIcon = bmp.GetHicon();
try
{
System.Drawing.Icon.FromHandle(hIcon).Save(stream);
}
finally { NativeMethods.DestroyIcon(hIcon); }
stream.Seek(2, SeekOrigin.Begin);
stream.WriteByte(2);
stream.Seek(10, SeekOrigin.Begin);
stream.WriteByte(x);
stream.Seek(12, SeekOrigin.Begin);
stream.WriteByte(y);
stream.Seek(0, SeekOrigin.Begin);
return new Cursor(stream);
}
However the colors of my cursor are all wrong!
It looks like it is using a palette / a limited set of 16/32/256 colors?!
Is it possible to have 24bits/32bits colors cursor? (i.e. with millions of possible color value)
[EDIT] Solved!
I found a way to do it! With the following API in sequences:
GetHIcon() <br />
CreateIconIndirect() <br />
CursorInteropHelper<br />
There was just some nagging issue to avoid GDI Object leaks which I solved by creating a
class SafeIconHandle : SafeHandle
modified 4-Jun-15 20:19pm.
|
|
|
|
|
|