|
|
Hello man,
It's very nice 2 hear from a real Microsoft person
By the way, I saw your article only few days after I publish my article on CodeGuru,
(Maybe I should work 4 Microsoft 2
I read your comment about the rights stuff,
Anyway, your article, my article and many other articles
that uses the IPicture interface does not violate any rights,
This is becuase all of these articles or software that are made
using the IPicture interface do not actually do the decompression,
it occurs on the IPicture interface (on the Windows software)
As U suggested - Microsoft may have the license to use it,
so basically a developer that uses the IPicture interface does
not decompress data but just triggers Windows to to it for him,
By the way, I love to hear from U if there some similar interface
to handle or render some video streams (+ what about codecs ?)
Best Regards - Yovav Gad
EMail: Yovav@SuperMain.com
Web-Site: www.SuperMain.com
|
|
|
|
|
I am just a no-name person who read your article and paste/reply what I have read for you.
I am NOT Paul and I can not speak for him.
Yes, both of you use IPciture and implemention are very similiar.
However, I do not think Paul work for M$ (well, maybe..., a MSDN-column-editor he is.)
I thought Paul's first CPicture was post around 199X... not 200X.
Anyway, I like Paul's CPicture because it's more like "C"Picture (MFC....)
About Copyright.... I am so glad that you said: FREE.. I think you may write Paul about Copyright/right stuff. Does he say anything about "I have all right reserved that you can not use it in commerical application..."?
Keep rolling send you a rose.
|
|
|
|
|
Hi again,
well, U R right, he made it more like a control,
basically this is the way Microsoft do most of their stuff,
and as said, by using the IPicture interface U do not use any
compression / decompression methods (Windows does...)
+
Even though I'm not gay, I'm sending U some flowers back
Best Regards - Yovav Gad
EMail: Yovav@SuperMain.com
Web-Site: www.SuperMain.com
|
|
|
|
|
Hello.
I use CPicture Class to display gif image file on the dialog. It can be shown when I debug my project but when I run the project it cannot be shown.I insert the code in the OnPaint() function.
My code is
CPaintDC dc(this);
CPicture m_Result;
m_Result.Load("C:\\mypic.gif");
m_Result.UpdateSizeOnDC(&dc);
m_Result.Show(&dc, CPoint(0,0), CPoint(m_Result.m_Width, m_Result.m_Height),0,0);
PS. I used to insert Invalidate()and InvalidateRect().But it is not work.
What should I do?
Thank you so much.
|
|
|
|
|
I think it is because your OnInitDialog or OnPaint block your show area,
I sent U a working example,
(http://OMyGad.com/Products/PictureShow/Picture_Dlg.zip)
|
|
|
|
|
I think it is because your OnInitDialog or OnPaint block your show area,
I sent U a working example,
(http://OMyGad.com/Products/PictureShow/Picture_Dlg.zip)
Best Regards - Yovav Gad
EMail: Yovav@SuperMain.com
Web-Site: www.SuperMain.com
|
|
|
|
|
Hello
because this problem, I work 20 min.
bye..^^
|
|
|
|
|
Hi,Yovav!
I'm Milcho.I'm relatively new C++ programmer and I don't understand yet much of those interfaces like IPicture
I really liked your class.It's very useful and easy to use.I have one question to you and I'll be happy if you response:
Is it possible to load a JPEG image in a specific rectangular area on a dialog window,but if the image is bigger,not to be zoomed,and to be shown in its real size and to appear scroll bars,so I to be able to scroll to see the whole image?
Thanks in advance!
|
|
|
|
|
I'm respect you, Dr. Yovav Gad.
you're creat!
|
|
|
|
|
Well, 10X
Best Regards - Yovav Gad
EMail: Yovav@SuperMain.com
Web-Site: www.SuperMain.com
|
|
|
|
|
Thanks for the great class it works perfect!
But can you make it support PNG too, or is that just not possible??
If not I just use GIF, but really like to use PNG instead.
Thanks again, great work. It's a lot easier to use then for example CxImage.
|
|
|
|
|
Hello Yovav!
I'm new to C++ program, i would like to ask how to change the icon and the default picture of "Picture Show?
Best Rgds,
Martin
|
|
|
|
|
That's easy.
The Icon:
Fire up Visual C++ and open PictureShow.dsw, then go to the resource tab.
Open up the Icon section and double click on IDR_MAINFRAME.
You can edit the icon now.
The Image:
Same thing, but now go to the "JPG" section... just replace IDR_DEFAULT with the JPG you want.
(open up your desired JPG in a HEX editor and copy/paste the data into that IDR_DEFAULT thing)
|
|
|
|
|
Yea, as Mr.Before U just said,
+ U may not see more than 256 colors on VC6,
anyway - it will show true color on program
(if windows support it...)
Best Regards - Yovav Gad
EMail: Yovav@SuperMain.com
Web-Site: www.SuperMain.com
|
|
|
|
|
When I open several Internet Explorer, my application program using CPicture class maybe popup: Cannot allocate enough memory! How to solve this problem?
Thanks!
|
|
|
|
|
Buy more memory
Best Regards - Yovav Gad
EMail: Yovav@SuperMain.com
Web-Site: www.SuperMain.com
|
|
|
|
|
Look, in the function where you call the CPcture::Show function(maybe OnPaint or OnDraw),if you forgot to call the CPicture::UpdateSizeOnDC(CDC *pDC) function before that.The same problem appeared at me and was wondering what exactly is wrong because I have more than enough memory, until I saw that I missed to call CPicture::UpdateSizeOnDC(CDC *pDC) before the CPcture::Show function.I hope that now your problem is solved.;)
Best regards,
Milcho
|
|
|
|
|
I get this output while running PictureShow
First-chance exception in PictureShow.exe (GDI32.DLL): 0xC0000005: Access Violation.
First-chance exception in PictureShow.exe (GDI32.DLL): 0xC0000005: Access Violation
Is this a serious error or can it be Ignored?
Another poster has mentioned about this error. but no response for this.
Yovav can you please look into this?
I want to know because my program is crashing afterwards
Thanks in Advance.
|
|
|
|
|
This is repost of a message by Henry P from another CodeProject thread.
Since I am also facing the problem, I am just putting it here to get the attention of the knowledged.
Any information on how this problem can be solved is sincerely requested.
------------------------------------------------------------------------
Another minor issue. OleLoadPicture (from the MSDN sample LoadPic.exe) works beautifully when the display is set at 24 or 32-bit color mode. But on 16-bit displays, the image quality is significantly degraded, more so than you'd expect. For comparison, I used a graphics program to open the same image and it looks much better even at 16-bit. See screen shots here:
http://www.allersoft.com/files/oleloadpicture.htm
One interesting thing is that the output of LoadPic.exe is dependent on the display color mode at the time the program started. If you switch color modes while the program is running, that has no effect. It seems that OleLoadPicture internally downgrades the image to 16-bit if the program is run on a 16-bit display. Is there anyway to prevent this?
|
|
|
|
|
http://www.codeproject.com/bitmap/cpicture.asp
It's pretty much the same class (can't tell if Yovav's copied Hendrix, the other way around, or if they were both inspired by a third source) but Hendrix's code is, in my eyes at least, much cleaner and features fewer annoying and misspelled comments.
The supported file formats and the basic functionality is exactly the same as far as I can tell. I suggest anyone looking at Yovav's CPicture take a look at Hendrix's as well. I have made some improvements to the code myself and will be publishing it soon on my own web page (see signature).
[ PlanetCPP ][ home of the n00blist ]
|
|
|
|
|
I just finished rolling up my own version of the CPicture class.
The result, should you be interested in it, is available for download at my website, PlanetCPP, in the "Get Code" section. My version of CPicture is released under the GPL license.
Please let me know what you think!
[ PlanetCPP ][ home of the n00blist ]
|
|
|
|
|
I tried your project and encountered a "ASSERT FAILED" at the FUNCTION:"BOOL CPictureShowDoc::CreateFilesList()" at line: " if(m_Finder.IsDots() || m_Finder.IsDirectory()) m_Finding = m_Finder.FindNextFile();
"
Perhaps you can do like this:
"
while(m_Finding == TRUE)
{
m_Finding = m_Finder.FindNextFile();//Must do this at first.
if(m_Finder.IsDots() || m_Finder.IsDirectory()) continue;// m_Finding = m_Finder.FindNextFile();
else // It Is a File...
{
// Get The Extention Of The Current Handled File
Extention.Format("%s", FileExtentionOnly(m_Finder.GetFileName()));
Extention.MakeUpper(); // Just In Case (Sensitive)...
// Add To The List
if(IsWantedExtention(Extention)) m_FilesList.AddTail(m_Finder.GetFileName());
}
}
"
Thanx for your code.
|
|
|
|
|
check out the fix 4 that,
couple messages before U
(on this forum):
"Re: Error When Use CPicture"
|
|
|
|
|
At first ,my program is written in Debug version,your program is Release version.If I switch your program into Debug version,your program can bulid,link,but cannot exe.I added your some codes into my program from your program,the following errors appeared:
Debug Assertion Failed
program:G\my project\WorkTemplate\Debug\WorkTemplate.exe
File:objcore.cpp
Line:43
For infomation on how your program can cause an assertion failure,
see the the Visual C++ documentation on asserts.
(Press Retry to debug the application)
here are Abort Retry Ignore three buttons
If I click the Retry,the following words appeared:
unknown software exception(0x80000003),lies at 0x00498a92
|
|
|
|