Jim,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Well, that is my problem – it is not clear how it scales or why if I don’t request it!!  What we used to call an ‘undocumented feature’<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The input to the context is the input format, the input sizes, the output format and the output sizes.  Gray levels, scaling, expected means etc.  have no part of the context or the input.  I would post my  code but I am away from the workstation at the moment.  But if you look at the function calls for sws_getcontext and  sws_scale you will no mention of modifying gray levels.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span><br></p></div></div></blockquote></div><br><br>A code snippet with your <span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">sws_* </span>calls + values of arguments are worth many words. Post this information here and we will see what is going on.<br>
<br>Roman<br>