[ 
https://issues.apache.org/jira/browse/TS-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153764#comment-15153764
 ] 

ASF GitHub Bot commented on TS-4095:
------------------------------------

Github user bgaff commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/393#discussion_r53425864
  
    --- Diff: plugins/experimental/webp_transform/ImageTransform.cc ---
    @@ -0,0 +1,109 @@
    +/**
    +  Licensed to the Apache Software Foundation (ASF) under one
    +  or more contributor license agreements.  See the NOTICE file
    +  distributed with this work for additional information
    +  regarding copyright ownership.  The ASF licenses this file
    +  to you under the Apache License, Version 2.0 (the
    +  "License"); you may not use this file except in compliance
    +  with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +  Unless required by applicable law or agreed to in writing, software
    +  distributed under the License is distributed on an "AS IS" BASIS,
    +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +  See the License for the specific language governing permissions and
    +  limitations under the License.
    + */
    +
    +#include <sstream>
    +#include <iostream>
    +#include <atscppapi/PluginInit.h>
    +#include <atscppapi/GlobalPlugin.h>
    +#include <atscppapi/TransformationPlugin.h>
    +#include <atscppapi/Logger.h>
    +
    +#include <Magick++.h>
    +
    +using std::string;
    +using namespace Magick;
    +using namespace atscppapi;
    +
    +namespace
    +{
    +#define TAG "webp_transform"
    +}
    +
    +class ImageTransform : public TransformationPlugin
    +{
    +public:
    +  ImageTransform(Transaction &transaction) : 
TransformationPlugin(transaction, TransformationPlugin::RESPONSE_TRANSFORMATION)
    +  {
    +    TransformationPlugin::registerHook(HOOK_READ_RESPONSE_HEADERS);
    +    InitializeMagick("");
    --- End diff --
    
    Does this need to happen for every request that is transformed?


> New cppapi plugin for converting image formats to wepb
> ------------------------------------------------------
>
>                 Key: TS-4095
>                 URL: https://issues.apache.org/jira/browse/TS-4095
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: CPP API, Plugins
>            Reporter: Sandeep Davu
>            Assignee: Brian Geffon
>              Labels: review
>             Fix For: 6.2.0
>
>
> Support for png and jpeg only.  Webp is a format introduced by google and can 
> retain the quality of the image by reducing the image size.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to