|
|
Hi all,
How can I achieve antialiasing for bitmap edges programatically as the Windows XP do for icons...
Any suggestions or links are welcomed.
Thank you.
- NS -
|
|
|
|
|
what are you hoping to do here - to merge the edges with the background ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
If you want a gradual gradient, I'm not sure that there's any way of doing this without writing your own filter code. You can specify the transparency of an image when you draw it, you could draw it in sections to create this effect. A filter seems like overkill, but I'm not aware of a way to do it so you draw the image, and the transparency is applied by itself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you...
I got a little idea. That is, use an image and its filter separately. Filter means transparency of pixels in the image. I think this may be the idea behind the 32bit icons. Am I right?
- NS -
|
|
|
|
|
You can set the transparency of a section as you draw it. I don't know of a way to set the transparency differently based on position in the image.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm sorry, I don't understand what you meant by section. Could you clarify it, please?
- NS -
|
|
|
|
|
When you draw an image, you can specify the transparency for the entire image only, AFAIK. If you draw an image a bit at a time, you could specify transparency for each bit as you draw it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Oh, I see.
Thank you. Let me try...
But I'm not so sure about what functions I should use for it... Anyway I feel that I can do it... Thank you.
- NS -
|
|
|
|
|
If DrawImage doesn't offer it ( it may, in the ImageAttributes class you pass in ), then using a TextureBrush will.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I afraid that you are specifying GDI+ functions. But I was talking about Win32 SDK...
- NS -
|
|
|
|
|
Oh, then you're screwed. There's a TransparentBlt, which is probably your best option, and you will almost certainly have to draw the image in sections to specify different transparencies around the edges. W95 is the only OS that does not support TransparentBlt.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes... I will try.
I think it can be done by using my own bitmap format in which I can specify the RGB and Transparency for each pixel.
- NS -
|
|
|
|
|
I'm doing it in my application. Images are draw in real-time using the CxImage library, which offer the transparency function.
You just have to define transparency on image using Paintshoppro for a single image, or jasc animation shop for a animated giff image. then load the image using function of the CxImage libray (transparency is automaticly managed). Then draw the image in you favorite DC.
I use also transform function of the library for rotating and sampling images.
That's a solution.
Good luck.
NKH
|
|
|
|
|
Could you tell me about getting this library, please?
- NS -
|
|
|
|
|
This library is available on CodeProject.
Try the keyword Cximage.
There is an exemple in demo file, which show how to use simple functions.
It allows to open many king of image files (jpg, gif, bmp...) and proposes a lot of functions. Quite a little complicated, but if you use only some functions quite great. Thank's to david pizzolato.
For real time display, there are some limitations due to its high computation load, but I didn't find other lib which manages easily transparency.
NKH
|
|
|
|
|
Yes, I got it... Thank you very much.
- NS -
|
|
|
|
|
How to use DeviceIOControl to read,wrire ... sector . My teacher asks me for imitating absread,abswite... of Boland C by DeviceIOControl of Visual C .
Thank you a lot
imagic
-- modified at 20:12 Sunday 11th December, 2005
|
|
|
|
|
Hello.
You don't need DeviceIOControl to do that.
Just use ordinary functions, like CreateFile, ReadFile, WriteFile, CloseFile and SetFilePointer.
As this is a school-project, I won't give you too much information, but I can tell you this:
1.
The least bit of information you can handle (read, write and seek to) is a disk sector!
A disk sector is (normally) 512 bytes.
2.
You open a volume (unit) by using the name "\\.\<x>:" where <x> is the drive in question.
\\.\A: Opens drive A (floppy drive).
\\.\C: Opens drive C (volume).
3.
All information is available at MSDN (msdn.microsoft.com).
Good luck. The assignment should be fairly easy to accomplish.
Kakan
-- modified at 6:21 Monday 12th December, 2005
|
|
|
|
|
Hi
I have written a Reliable Multicast Protocol, which all works fine except that the protocol processing thread and the Media timer used will sometimes stop for up to 400mS which causes a prolem. I have changed thread priorities and Virtual Locked memory to prevent paging delays. I would realy like some suggestions as to the best implementation for this project, should it be written as a standalone process?
TIA
Richard
|
|
|
|
|
What are you using the media timer for ?
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi
The media timer is used for process timouts/RTT packet time stamping etc. I had initialy used TimerQueueTimers but found them to be not very acurate at high resolutions.
|
|
|
|
|
RKRobinson wrote: The media timer is used for process timouts/RTT packet time stamping etc.
So you are just using it to get an accurate 'current time' stamp.
I was wondering if you were using it as part of a loop.
I'm sure you realize Win is a preemptive OS - the kernel schedules when threads run.
Any priority boost you specify is taken as a suggestion by the kernel.
There is no real way to guarantee time for a thread.
Currently, the most scalable/responsive I/O systems are built around IOCP (I/O completion ports).
Len Holgate, and others, have written comprehensive articles about IOCP here: http://www.codeproject.com/internet/[^].
...cmk
Save the whales - collect the whole set
|
|
|
|
|
im sorry im really new to the windows media format sdk...
by looking at the WMSyncReader sample that came with the sdk
i have learned how to set up the WMSyncReader and everything
but i still have this question
it seems that WMSyncReader::GetNextSample() uses an INSSBuffer interface
to store audio data when i invoke it.
How can i take the data from an INSSBuffer into, say, a byte array?
Also, how do you get the audio format of the stream? Maybe WMProfile? or WMStreamConfig?
any answers are highly appreciated
thanks!
|
|
|
|