Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: mutex problem Pin
Richard MacCutchan14-Jun-23 21:17
mveRichard MacCutchan14-Jun-23 21:17 
AnswerRe: mutex problem Pin
jschell15-Jun-23 2:33
jschell15-Jun-23 2:33 
QuestionIs there a way to add all the elements of a vector to an integer sequentially? Pin
puckettrobinson6755-Jun-23 18:16
puckettrobinson6755-Jun-23 18:16 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
Victor Nijegorodov5-Jun-23 20:39
Victor Nijegorodov5-Jun-23 20:39 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
Richard MacCutchan5-Jun-23 21:30
mveRichard MacCutchan5-Jun-23 21:30 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
CPallini5-Jun-23 21:44
mveCPallini5-Jun-23 21:44 
QuestionImage compression Pin
Calin Negru30-May-23 9:09
Calin Negru30-May-23 9:09 
AnswerRe: Image compression Pin
OriginalGriff30-May-23 9:18
mveOriginalGriff30-May-23 9: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 Negru30-May-23 23:52
Calin Negru30-May-23 23:52 
QuestionCom Automation latest library for working with ms excel. Pin
I_am_nayak22-May-23 18:34
I_am_nayak22-May-23 18:34 
AnswerRe: Com Automation latest library for working with ms excel. Pin
_Flaviu22-May-23 20:28
_Flaviu22-May-23 20:28 
AnswerRe: Com Automation latest library for working with ms excel. Pin
Victor Nijegorodov22-May-23 22:47
Victor Nijegorodov22-May-23 22:47 
QuestionCPU Usage Pin
Richard Andrew x6419-May-23 15:56
professionalRichard Andrew x6419-May-23 15:56 
AnswerRe: CPU Usage Pin
Dave Kreskowiak19-May-23 17:48
mveDave Kreskowiak19-May-23 17:48 
GeneralRe: CPU Usage Pin
harold aptroot19-May-23 18:53
harold aptroot19-May-23 18:53 
AnswerRe: CPU Usage Pin
Greg Utas20-May-23 0:13
professionalGreg Utas20-May-23 0:13 
AnswerRe: CPU Usage Pin
Gerry Schmitz20-May-23 4:04
mveGerry Schmitz20-May-23 4:04 
AnswerRe: CPU Usage Pin
Randor 20-May-23 6:38
professional Randor 20-May-23 6:38 
GeneralRe: CPU Usage Pin
Richard Andrew x6420-May-23 10:21
professionalRichard Andrew x6420-May-23 10:21 
GeneralRe: CPU Usage Pin
Dave Kreskowiak20-May-23 19:30
mveDave Kreskowiak20-May-23 19:30 
QuestionRe: CPU Usage Pin
David Crow22-May-23 7:49
David Crow22-May-23 7:49 
AnswerRe: CPU Usage Pin
Dave Kreskowiak22-May-23 8:43
mveDave Kreskowiak22-May-23 8:43 
GeneralRe: CPU Usage Pin
Dave Kreskowiak20-May-23 10:28
mveDave Kreskowiak20-May-23 10:28 
QuestionA two-dimensional std::vector for use by all Pin
polcott18-May-23 10:06
polcott18-May-23 10:06 
AnswerRe: A two-dimensional std::vector for use by all Pin
Gerry Schmitz18-May-23 18:25
mveGerry Schmitz18-May-23 18: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.