Click here to Skip to main content
15,846,726 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: mutex problem Pin
Richard MacCutchan14-Jun-23 22:17
mveRichard MacCutchan14-Jun-23 22:17 
AnswerRe: mutex problem Pin
jschell15-Jun-23 3:33
jschell15-Jun-23 3:33 
QuestionIs there a way to add all the elements of a vector to an integer sequentially? Pin
puckettrobinson6755-Jun-23 19:16
puckettrobinson6755-Jun-23 19:16 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
Victor Nijegorodov5-Jun-23 21:39
Victor Nijegorodov5-Jun-23 21:39 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
Richard MacCutchan5-Jun-23 22:30
mveRichard MacCutchan5-Jun-23 22:30 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
CPallini5-Jun-23 22:44
mveCPallini5-Jun-23 22:44 
QuestionImage compression Pin
Calin Negru30-May-23 10:09
Calin Negru30-May-23 10:09 
AnswerRe: Image compression Pin
OriginalGriff30-May-23 10:18
mveOriginalGriff30-May-23 10:18 
Probably not - it depends on the compression method.

There are two different types of image compression: lossless and lossy.
PNG for example is lossless - when it is decompressed to a bitmap for display, the bitmap is identical to the original input bitmap data.
JPG is lossy - when it is decompressed the resulting image is lower quality than the original.

You can prove this with any image editor: load a bitmap, save it as a JPG. Open the JPG, save it as a new JPG. Repeat a few times, and watch how the image size drops, the compare the original with the final result. It doesn't take many iterations before the result as very clear to see.
Do the same with a PNG file and the result will be identical to the original.

There is also the problem that any form of compression adds overhead to the resulting file to manage the compression - and small files or those containing a high degree of randomisation can end up bigger than the uncompressed original as a result!

If you really want to know about image compression, Google / Wiki is the place to start: but be warned that the math gets pretty hairy!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Image compression Pin
Calin Negru31-May-23 0:52
Calin Negru31-May-23 0:52 
QuestionCom Automation latest library for working with ms excel. Pin
I_am_nayak22-May-23 19:34
I_am_nayak22-May-23 19:34 
AnswerRe: Com Automation latest library for working with ms excel. Pin
_Flaviu22-May-23 21:28
_Flaviu22-May-23 21:28 
AnswerRe: Com Automation latest library for working with ms excel. Pin
Victor Nijegorodov22-May-23 23:47
Victor Nijegorodov22-May-23 23:47 
QuestionCPU Usage Pin
Richard Andrew x6419-May-23 16:56
professionalRichard Andrew x6419-May-23 16:56 
AnswerRe: CPU Usage Pin
Dave Kreskowiak19-May-23 18:48
mveDave Kreskowiak19-May-23 18:48 
GeneralRe: CPU Usage Pin
harold aptroot19-May-23 19:53
harold aptroot19-May-23 19:53 
AnswerRe: CPU Usage Pin
Greg Utas20-May-23 1:13
professionalGreg Utas20-May-23 1:13 
AnswerRe: CPU Usage Pin
Gerry Schmitz20-May-23 5:04
mveGerry Schmitz20-May-23 5:04 
AnswerRe: CPU Usage Pin
Randor 20-May-23 7:38
professional Randor 20-May-23 7:38 
GeneralRe: CPU Usage Pin
Richard Andrew x6420-May-23 11:21
professionalRichard Andrew x6420-May-23 11:21 
GeneralRe: CPU Usage Pin
Dave Kreskowiak20-May-23 20:30
mveDave Kreskowiak20-May-23 20:30 
QuestionRe: CPU Usage Pin
David Crow22-May-23 8:49
David Crow22-May-23 8:49 
AnswerRe: CPU Usage Pin
Dave Kreskowiak22-May-23 9:43
mveDave Kreskowiak22-May-23 9:43 
GeneralRe: CPU Usage Pin
Dave Kreskowiak20-May-23 11:28
mveDave Kreskowiak20-May-23 11:28 
QuestionA two-dimensional std::vector for use by all Pin
polcott18-May-23 11:06
polcott18-May-23 11:06 
AnswerRe: A two-dimensional std::vector for use by all Pin
Gerry Schmitz18-May-23 19:25
mveGerry Schmitz18-May-23 19:25 

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.