Uploaded image for project: 'YesCart'
  1. YesCart
  2. YC-378

There is a bug on resizing PNG images

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0, 2.2.0
    • Fix Version/s: None
    • Component/s: sf server
    • Labels:
      None

      Description

      When uploading a png image for product, resized version of the image will be shown as broken. If open the thumbnail in a new tab, an error message appears:

      paddedOp.getAsBufferedImage() - cause of the error (ImageServiceImpl.resizeImage(ImageServiceImpl.java:159))

      HTTP Status 500 - Band count exceeds non-unity number of constants.

      type Exception report

      message Band count exceeds non-unity number of constants.

      description The server encountered an internal error that prevented it from fulfilling this request.

      exception

      java.lang.UnsupportedOperationException: Band count exceeds non-unity number of constants.
      javax.media.jai.BorderExtenderConstant.clamp(BorderExtenderConstant.java:77)
      javax.media.jai.BorderExtenderConstant.extend(BorderExtenderConstant.java:216)
      javax.media.jai.PlanarImage.copyExtendedData(PlanarImage.java:2402)
      com.sun.media.jai.opimage.BorderOpImage.computeTile(BorderOpImage.java:211)
      com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
      javax.media.jai.OpImage.getTile(OpImage.java:1129)
      javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343)
      javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299)
      javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525)
      javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546)
      org.yes.cart.service.domain.impl.ImageServiceImpl.resizeImage(ImageServiceImpl.java:159)
      sun.reflect.GeneratedMethodAccessor448.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      $Proxy248.resizeImage(Unknown Source)
      sun.reflect.GeneratedMethodAccessor448.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      $Proxy249.resizeImage(Unknown Source)
      org.yes.cart.web.filter.ImageFilter.getImageFile(ImageFilter.java:247)
      org.yes.cart.web.filter.ImageFilter.handleRequestInternal(ImageFilter.java:184)
      org.yes.cart.web.filter.ImageFilter.doBefore(ImageFilter.java:221)
      org.yes.cart.web.filter.AbstractFilter.doFilter(AbstractFilter.java:66)
      org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      org.yes.cart.web.filter.AbstractFilter.doFilter(AbstractFilter.java:70)
      org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      org.yes.cart.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
      org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                denis Denis Pavlov
                Reporter:
                denis.lozenko Denis Lozenko (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: