Skip to content

Wrong HTML for changing image resolutions (and how to fix it) #5324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chupocro opened this issue Jun 24, 2021 · 0 comments · Fixed by #5397
Closed

Wrong HTML for changing image resolutions (and how to fix it) #5324

chupocro opened this issue Jun 24, 2021 · 0 comments · Fixed by #5397
Assignees
Milestone

Comments

@chupocro
Copy link

The HTML code for changing image resolution inside const uint8_t index_ov2640_html_gz[] = {} in camera_index.h is wrong and because of that it isn't possible to activate 1600x1200 resolution and all picture resolutions are wrong. To fix the code, instead of:

<div class="input-group" id="framesize-group">
    <label for="framesize">Resolution</label>
    <select id="framesize" class="default-action">
        <option value="10">UXGA(1600x1200)</option>
        <option value="9">SXGA(1280x1024)</option>
        <option value="8">XGA(1024x768)</option>
        <option value="7">SVGA(800x600)</option>
        <option value="6">VGA(640x480)</option>
        <option value="5" selected="selected">CIF(400x296)</option>
        <option value="4">QVGA(320x240)</option>
        <option value="3">HQVGA(240x176)</option>
        <option value="0">QQVGA(160x120)</option>
    </select>
</div>

it should be:

<div class="input-group" id="framesize-group">
    <label for="framesize">Resolution</label>
    <select id="framesize" class="default-action">
        <option value="13">UXGA(1600x1200)</option>
        <option value="12">SXGA(1280x1024)</option>
        <option value="10">XGA(1024x768)</option>
        <option value="9">SVGA(800x600)</option>
        <option value="8">VGA(640x480)</option>
        <option value="6" selected="selected">CIF(400x296)</option>
        <option value="5">QVGA(320x240)</option>
        <option value="3">HQVGA(240x176)</option>
        <option value="1">QQVGA(160x120)</option>
    </select>
</div>

Use Cyberchef online tool to decode the array into HTML (from hex, gunzip), change the HTML and then encode it back into gunzipped array of hex. Recipe to decode the array:

From_Hex('Auto')
Gunzip()

Recipe to encode the HTML back into array of hex:

Encode_text('UTF-8 (65001)')
Gzip('Dynamic Huffman Coding','','',false)
To_Hex('0x with comma',16)
@VojtechBartoska VojtechBartoska added this to the 2.0.0 milestone Jul 14, 2021
me-no-dev added a commit that referenced this issue Jul 16, 2021
me-no-dev added a commit that referenced this issue Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants