** Function name: setJpgScale ** Description: Set the reduction scale factor (1, 2, 4 or 8) ***************************************************************************************/
| 46 | ** Description: Set the reduction scale factor (1, 2, 4 or 8) |
| 47 | ***************************************************************************************/ |
| 48 | void TJpg_Decoder::setJpgScale(uint8_t scaleFactor) |
| 49 | { |
| 50 | switch (scaleFactor) |
| 51 | { |
| 52 | case 1: |
| 53 | jpgScale = 0; |
| 54 | break; |
| 55 | case 2: |
| 56 | jpgScale = 1; |
| 57 | break; |
| 58 | case 4: |
| 59 | jpgScale = 2; |
| 60 | break; |
| 61 | case 8: |
| 62 | jpgScale = 3; |
| 63 | break; |
| 64 | default: |
| 65 | jpgScale = 0; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /*************************************************************************************** |
| 70 | ** Function name: setCallback |