<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [EFL] Jpeg image export implementation for Canvas."
   href="https://bugs.webkit.org/show_bug.cgi?id=145457#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [EFL] Jpeg image export implementation for Canvas."
   href="https://bugs.webkit.org/show_bug.cgi?id=145457">bug 145457</a>
              from <span class="vcard"><a class="email" href="mailto:hyuki.kim&#64;samsung.com" title="KwangHyuk &lt;hyuki.kim&#64;samsung.com&gt;"> <span class="fn">KwangHyuk</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=145457#c2">comment #2</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=253960&amp;action=diff" name="attach_253960" title="Patch">attachment 253960</a> <a href="attachment.cgi?id=253960&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=253960&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=253960&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebCore/ChangeLog:20
&gt; &gt; +        * platform/image-encoders/JPEGImageEncoder.cpp:
&gt; 
&gt; You need to explain what is modified.
&gt; 
&gt; &gt; Source/WebCore/platform/MIMETypeRegistry.cpp:270
&gt; &gt; +#elif PLATFORM(EFL)
&gt; 
&gt; Why can't we support image/tiff, image/bmp, image/ico ?
&gt; 
&gt; Besides I think GTK and EFL have used cairo backend. Thus it might be good
&gt; if you change this change as below,
&gt; 
&gt;  #elif PLATFORM(GTK)
&gt; -    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/png&quot;);
&gt; -    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/jpeg&quot;);
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/tiff&quot;);
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/bmp&quot;);
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/ico&quot;);
&gt;  #elif USE(CAIRO)
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/png&quot;);
&gt; +    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/jpeg&quot;);
&gt; +    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/png&quot;);
&gt;  #endif
&gt; </span >

it's guarded by using #elif, therefore, it should be touched in order to re-use CAIRO definition.
This cairo definition might be for window port ?

<span class="quote">&gt; &gt; Source/WebCore/platform/graphics/efl/ImageBufferEfl.cpp:4
&gt; &gt; + *  This library is free software; you can redistribute it and/or
&gt; 
&gt; Oops. LGPL.... Please use BSD !
&gt; 
&gt; &gt; Source/WebCore/platform/image-encoders/JPEGImageEncoder.cpp:126
&gt; &gt; +        for (const unsigned char* rowEnd = pixel + offset + compressData.image_width * 4; pixel + offset &lt; rowEnd;) {
&gt; 
&gt; I think this change can influence on other ports. So you need to explain why
&gt; you modify this code.</span >

ImageEncoder was not used by other port yet. :)


(In reply to <a href="show_bug.cgi?id=145457#c2">comment #2</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=253960&amp;action=diff" name="attach_253960" title="Patch">attachment 253960</a> <a href="attachment.cgi?id=253960&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=253960&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=253960&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebCore/ChangeLog:20
&gt; &gt; +        * platform/image-encoders/JPEGImageEncoder.cpp:
&gt; 
&gt; You need to explain what is modified.
&gt; 
&gt; &gt; Source/WebCore/platform/MIMETypeRegistry.cpp:270
&gt; &gt; +#elif PLATFORM(EFL)
&gt; 
&gt; Why can't we support image/tiff, image/bmp, image/ico ?
&gt; </span >

Because this patch is just for adding jpeg export feature on Webkit EFL.
So, It's not necessary.
However, this can be considered as other new bug.

<span class="quote">&gt; Besides I think GTK and EFL have used cairo backend. Thus it might be good
&gt; if you change this change as below,
&gt; 
&gt;  #elif PLATFORM(GTK)
&gt; -    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/png&quot;);
&gt; -    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/jpeg&quot;);
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/tiff&quot;);
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/bmp&quot;);
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/ico&quot;);
&gt;  #elif USE(CAIRO)
&gt;      supportedImageMIMETypesForEncoding-&gt;add(&quot;image/png&quot;);
&gt; +    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/jpeg&quot;);
&gt; +    supportedImageMIMETypesForEncoding-&gt;add(&quot;image/png&quot;);
&gt;  #endif
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/efl/ImageBufferEfl.cpp:4
&gt; &gt; + *  This library is free software; you can redistribute it and/or
&gt; 
&gt; Oops. LGPL.... Please use BSD !
&gt; </span >

Thx, let me think about it.

<span class="quote">&gt; &gt; Source/WebCore/platform/image-encoders/JPEGImageEncoder.cpp:126
&gt; &gt; +        for (const unsigned char* rowEnd = pixel + offset + compressData.image_width * 4; pixel + offset &lt; rowEnd;) {
&gt; 
&gt; I think this change can influence on other ports. So you need to explain why
&gt; you modify this code.</span >


Unfortunately, it just generates clobbered error caused by setjmp and longjmp.
So, I just modified some code related with pixel variable.
However, the logic is same.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>