congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Thumber$WidthHeightHelper
Code IndexAdd Tabnine to your IDE (free)

How to use
Thumber$WidthHeightHelper
in
com.atlassian.core.util.thumbnail

Best Java code snippets using com.atlassian.core.util.thumbnail.Thumber$WidthHeightHelper (Showing top 2 results out of 315)

origin: com.atlassian.core/atlassian-core-utils

    new AreaAveragingScaleFilter(newDimensions.getWidth(), newDimensions.getHeight());
ImageProducer producer = new FilteredImageSource(imageToScale.getSource(),
    scaleFilter);
origin: com.atlassian.core/atlassian-core-utils

public WidthHeightHelper determineScaleSize(int maxWidth, int maxHeight, int imageWidth, int imageHeight)
{
  if (maxHeight > imageHeight && maxWidth > imageWidth)
  {
    return new Thumber.WidthHeightHelper(imageWidth, imageHeight);
  }
  // Determine scale size.
  // Retain original image proportions with scaled image.
  double thumbRatio = (double) maxWidth / (double) maxHeight;
  double imageRatio = (double) imageWidth / (double) imageHeight;
  if (thumbRatio < imageRatio)
  {
    return new Thumber.WidthHeightHelper(maxWidth, (int) (maxWidth / imageRatio));
  }
  else
  {
    return new Thumber.WidthHeightHelper((int) (maxHeight * imageRatio), maxHeight);
  }
}
com.atlassian.core.util.thumbnailThumber$WidthHeightHelper

Most used methods

  • <init>
  • getHeight
  • getWidth

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now