Unplanned
Last Updated: 14 Jun 2021 22:39 by Cypher
Cypher
Created on: 09 Jun 2021 19:04
Category: ImageEditor
Type: Feature Request
1
How do I request the Kendo ImageEditor to save an image in the same format as the original ?

C# / .NET 5 / Telerik.UI.for.AspNet.Core (V2021.2.511)

 

Dear Telerik,

After opening a JPG file in the Kendo ImageEditor and selecting Save, the image is saved to a .jpg file but in the PNG format instead of the JPG format. This is quite annoying especially because of the increase in file size. For example, a 1MB JPG file is saved to a 6MB PNG file.

Question: How do I request the Kendo ImageEditor to save an image in the same format as the original ?

 

<div class="k-content">
  @(Html.Kendo ().ImageEditor ()
    .Name ("ImageEditor")
    .HtmlAttributes (new { @class = "w-100" })
    .Height (720)
    .SaveAs (PoSaveAs => PoSaveAs.FileName ("Image.jpg"))
    .Toolbar (PoToolbar => PoToolbar.Items (PoItem =>
    {
      PoItem.Add ().Name ("open") ;
      PoItem.Add ().Name ("save") ;

      PoItem.Add ().Name ("undo") ;
      PoItem.Add ().Name (
"redo") ;
      PoItem.Add ().Name (
"resize") ;
      PoItem.Add ().Name (
"crop") ;
      PoItem.Add ().Name (
"zoomIn") ;
      PoItem.Add ().Name (
"zoomOut") ;
      PoItem.Add ().Name (
"zoomDropdown") ;
    })))
</div>
 

Thanks for your help.

 

5 comments
Cypher
Posted on: 14 Jun 2021 22:39

Thanks Stoyan for your help.

Regards

ADMIN
Stoyan
Posted on: 14 Jun 2021 08:24

Hi Cypher,

That's the link to the Feature Request.

In addition I added a vote on your behalf. 

Regards,
Stoyan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Cypher
Posted on: 12 Jun 2021 00:13

Hi Stoyan,

Could you please send me the link to the Feature Request. I can't find it on the Feedback Portal.

Thanks

 

Cypher
Posted on: 11 Jun 2021 23:13

Hi Stoyan,

Thanks for your help.

Hope the request will be implemented. Saving files in the original format will be much appreciated instead of the default bulkier PNG format.

Regards

 

ADMIN
Stoyan
Posted on: 10 Jun 2021 15:55

Hello Cypher,

When the ImageEditor saves the canvas it uses the HTMLCanvasElement.toDataURL() method which returns a data URI containing a representation of the image in the format specified by the type parameter, but defaults to PNG.

Since the type parameter defaults to PNG the current behavior is expected, however the ImageEditor can be upgraded to support the request functionality. For this reason, I am changing the type of this thread to a Feature Request.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.