Click here to Skip to main content
15,890,376 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Which way should I select when save image from browser [modified] Pin
shi baoshi3-Aug-09 16:15
shi baoshi3-Aug-09 16:15 
GeneralRe: Which way should I select when save image from browser Pin
Code-o-mat3-Aug-09 21:06
Code-o-mat3-Aug-09 21:06 
GeneralRe: Which way should I select when save image from browser Pin
shi baoshi3-Aug-09 21:45
shi baoshi3-Aug-09 21:45 
GeneralRe: Which way should I select when save image from browser Pin
Code-o-mat3-Aug-09 22:43
Code-o-mat3-Aug-09 22:43 
GeneralRe: Which way should I select when save image from browser Pin
shi baoshi3-Aug-09 23:09
shi baoshi3-Aug-09 23:09 
GeneralRe: Which way should I select when save image from browser [modified] Pin
Code-o-mat3-Aug-09 23:16
Code-o-mat3-Aug-09 23:16 
GeneralRe: Which way should I select when save image from browser Pin
shi baoshi4-Aug-09 4:47
shi baoshi4-Aug-09 4:47 
GeneralRe: Which way should I select when save image from browser Pin
Code-o-mat4-Aug-09 6:14
Code-o-mat4-Aug-09 6:14 
If you drag a JPG or PNG image (since BMP formats are rarely used on websites i supose you are experimenting with those) and then save it as a BMP (from the CF_DIB) then it is no wonder the file size is bigger since JPG and PNG are compressed while the BMP (from the DIB) is not. When you save the DIB data to file you are actually not getting the very same file your browser downloaded (maybe unless it originally was a BMP) but you convert the image from JPG or PNG to uncompressed Windows Bitmap format, thus the filesize will be bigger. If you are using the CxImage aproach you are still not saving the very original file but what you are doing -in case of a JPG for example- is to let the browser decompress the JPG and store the pixel data into a DIB and then re-compressing that DIB back into a JPG again and saving that to file and nothing garantees that you will receive a "perfect copy" of the original JPG image.

shi baoshi wrote:
I want to know how can I get the image without CF_DIB data ,if I have to take CF_DIB data without any select,can the image be saved as cache?

I'm not sure i understand what you mean here but i guess what you want is to get the image from the browser's cache and copy it to wherever. I currently have no idea how you could figure out where the browser cached the image, but imho relying on that is not necesarily a good idea. I'm not sure how IE or any other browser handles caching but what if for example caching is turned off by the user completely? Could be that the browser does not save the image to any local file but only stores it in memory. I'd say if you want the very original file as it is, your best bet is still downloading it yourself again, i think using WinInet could be much of a help to you with that. You said that you tried the download aproach already but there were problems with the URLs. What problems? Could these maybe handled by Wininet's InternetOpenURL[^] function?

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: Which way should I select when save image from browser Pin
shi baoshi4-Aug-09 16:04
shi baoshi4-Aug-09 16:04 
QuestionUDP connection -&gt; outgoing port trouble (still) Pin
Souldrift2-Aug-09 21:39
Souldrift2-Aug-09 21:39 
AnswerRe: UDP connection -&gt; outgoing port trouble (still) Pin
pallaka2-Aug-09 22:15
pallaka2-Aug-09 22:15 
GeneralRe: UDP connection -&gt; outgoing port trouble (still) Pin
Souldrift2-Aug-09 22:22
Souldrift2-Aug-09 22:22 
GeneralRe: UDP connection -&gt; outgoing port trouble (still) Pin
harold aptroot3-Aug-09 0:04
harold aptroot3-Aug-09 0:04 
GeneralRe: UDP connection -&gt; outgoing port trouble (still) Pin
Souldrift3-Aug-09 2:04
Souldrift3-Aug-09 2:04 
QuestionWriting data to Database from Pure C++ Pin
Pardhu_M2-Aug-09 21:25
Pardhu_M2-Aug-09 21:25 
AnswerRe: Writing data to Database from Pure C++ Pin
N a v a n e e t h2-Aug-09 21:56
N a v a n e e t h2-Aug-09 21:56 
AnswerRe: Writing data to Database from Pure C++ Pin
CPallini2-Aug-09 22:03
mveCPallini2-Aug-09 22:03 
AnswerRe: Writing data to Database from Pure C++ Pin
kilt3-Aug-09 3:31
kilt3-Aug-09 3:31 
AnswerRe: Writing data to Database from Pure C++ Pin
Nemanja Trifunovic3-Aug-09 4:20
Nemanja Trifunovic3-Aug-09 4:20 
QuestionTabbing stop when focus go to Cancel button in MFC Screen Pin
MohammedAyaz Shaikh2-Aug-09 21:07
MohammedAyaz Shaikh2-Aug-09 21:07 
QuestionRe: Tabbing stop when focus go to Cancel button in MFC Screen Pin
David Crow3-Aug-09 3:58
David Crow3-Aug-09 3:58 
Questionhow to fetch excel data Pin
trioum2-Aug-09 21:00
trioum2-Aug-09 21:00 
AnswerRe: how to fetch excel data Pin
CPallini2-Aug-09 21:19
mveCPallini2-Aug-09 21:19 
AnswerRe: how to fetch excel data Pin
David Crow3-Aug-09 4:00
David Crow3-Aug-09 4:00 
QuestionTab order does not work properly in MFC Screen. Pin
MohammedAyaz Shaikh2-Aug-09 20:58
MohammedAyaz Shaikh2-Aug-09 20:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.