old vs new radchart image export compression test

5 posts, 0 answers
  1. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 24 Oct 2013 Link to this post

    old vs new radchart image export compression test

     First make simple test with old telerik radchart. Export  simple chart  to png image with pdf provader. Set compression level

    var provider = new PdfFormatProvider {ExportSettings = {ContentsCompressionMode = PdfContentsCompressionMode.Deflate, ContentsDeflaterCompressionLevel = 9, ImagesCompressionMode = PdfImagesCompressionMode.Deflate, ImagesDeflaterCompressionLevel = 5}};

    This work perfect.

     



    Make second test with new telerik radcartesian chart  (advance chart and telerik proud).

    Again test is the same, export image from radcartesian chart to png with pdf provaider with the same compression

    var provider = new PdfFormatProvider {ExportSettings = {ContentsCompressionMode = PdfContentsCompressionMode.Deflate, ContentsDeflaterCompressionLevel = 9, ImagesCompressionMode = PdfImagesCompressionMode.Deflate, ImagesDeflaterCompressionLevel = 5}};

    Result: Not work and give error with lattes adobe reader. Error message is: “Insufficient data for an image”

     

    var provider = new PdfFormatProvider {ExportSettings = {ContentsCompressionMode = PdfContentsCompressionMode.Deflate, ContentsDeflaterCompressionLevel = 9, ImagesCompressionMode = PdfImagesCompressionMode.Deflate, ImagesDeflaterCompressionLevel = 4}};

    9/4 Deflate -> Again the same result with

    9/3 Deflate -> Again the same result with

    9/2 Deflate -> Again the same result with

    9/1 Deflate -> BRAVO!!! Work! Do not any matter that compression of image is nearly to zero(0 value is equal to not any pdf image compression).

     

    GENERALconclusion:

    Old telerik RadChart work with pdf compression ;)

    New RadCartessianChart not work with pdf compression ;(

     

    For more info, read to the bottom…

    Description: D:\DW\Task\AdvanceTrendExport\image_radCartesianChart.png

     

    9/1 Deflate -> you see text in table. Good

     

     

    9/2 Deflate -> you not see text in table. Not good

    9/3 Deflate -> you not see text in table. Not good

    9/4 Deflate -> you not see text in table. Not good

    9/5 Deflate -> you not see text in table. Not good

     

     

     

     

     

     

     

     

     

     

    You see chart image in pdf document

     

    You do not see chart in pdf document

  2. ric
    ric avatar
    22 posts
    Member since:
    Apr 2011

    Posted 12 Dec 2013 Link to this post

    I'm also experiencing similar issues : compressed images are not saved into the PDF correctly, a bit of investigation suggests the wrong chunk size is being written to the pdf's internal dictionary

    e.g. I have a pdf which is 60kb in size, but the LENGTH key is set as ~1.5MB

    that's a one-page PDF with as single, large image in (from a writablebitmap of a control)

    it seems that certain PDF readers / code will ignore this when opening it, but others get very upset !
  3. DevCraft banner
  4. Petya
    Admin
    Petya avatar
    975 posts

    Posted 17 Dec 2013 Link to this post

    Hello,

    Thank you for contacting us!

    @kity Actually, at this point we'd suggest not setting the ImagesDeflaterCompressionLevel property and leave its default value. The issue you are facing is already in our to-do list, but I cannot tell when it might be resolved.

    @ric Thank you for sharing your observations with us. We will further investigate the cause of the observed behavior and will try to address it as soon as possible.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  5. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 19 Dec 2013 Link to this post

    Dataseries or Image Aspect Ration?

    Detail bug characteristics:

    See image test for more information. The problem is connect with data series but I am not 100% sure.

    It is not any diference about exporting .pdf/.doc file or simple use telerik print preview.

    Conclusion:

    1. Compression or image file format bug

    2. The problem is in dataseries but I am not 100% sure.

    3. Some time when change the size of float panel work correctly. May be problem is in telerik algothm that use for Image Aspect Ration when export chart image.



    Version:

    I have made test with lattest telerik version "RadControls_for_Silverlight5_2013_3_1216_DEV_hotfix".

    Test:

    See attache image for more information.

    The top dialogs are "telerik print preview".



    Please fix this bug. It is from the begging. I have seen this bug from more than 3 mounts before.

























  6. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 20 Dec 2013 Link to this post

    OK. I am now 100% sure that Telerik have bug with algorithm that depending aspect ration.

    Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(chart, ms, encoder);




Back to Top
DevCraft banner