Skip to content
Written for v1.1.0· Last updated: Mar 31, 2026

Image Adjustments

Core Feature

This feature is available in all Portrai Explorer deployments.

Image adjustments allow you to modify the appearance of the background tissue image. Adjust opacity, brightness, contrast, and saturation to improve visibility or emphasize specific features.

TIP

Image adjustments are accessed through the Layer Settings popover. Click the Layers button (layer icon) in the map viewer toolbar, then find the Image layer section.

Automatic Image Mode Detection

Portrai Explorer automatically detects the type of GeoTIFF image based on the number of bands:

Image TypeBand CountModeDefault Settings
RGB (H&E, brightfield)3+ bandsMulti-bandStandard settings
Fluorescence (DAPI, etc.)1 bandSingle-band (grayscale)Auto-detected contrast limits, additional controls

When a single-band (grayscale) image is detected, additional controls appear automatically:

  • Contrast Limits range slider (Min/Max) for contrast stretch
  • Channel Color selector for pseudocolor display

Available Adjustments

Opacity

Control the visibility of the background image.

ValueEffect
0Completely hidden
1Fully visible (default)

Use cases:

  • Lower opacity to make data points stand out
  • Hide completely for data-only views

Brightness

Control the overall lightness of the image.

ValueEffect
-1Maximum darkening
0Original brightness (default)
+1Maximum brightening

Use cases:

  • Increase brightness for dark tissue images
  • Decrease brightness to reduce distraction from background

Contrast

Control the difference between light and dark areas.

ValueEffect
-1Minimum contrast (flatter)
0Original contrast (default)
+1Maximum contrast (sharper)

Use cases:

  • Increase contrast to see tissue boundaries more clearly
  • Decrease contrast if image appears too harsh

Saturation

Control the intensity of colors in the image.

ValueEffect
-1Grayscale (no color)
0Original saturation (default)
+1Maximum saturation (vivid)

Use cases:

  • Reduce saturation if tissue colors compete with data point colors
  • Grayscale mode helps data points stand out
  • Increase saturation to emphasize tissue staining

Contrast Limits (Single-band (grayscale) only)

TIP

This control only appears for single-band (grayscale) images such as fluorescence microscopy.

Control the contrast stretch for fluorescence images using a two-handle Min/Max range slider. This is the industry standard approach used by ImageJ, napari, QuPath, and other microscopy viewers.

Portrai Explorer automatically computes optimal contrast limits by analyzing the image data. The 0.05th and 99.95th percentiles of non-zero pixel values are used as initial Min/Max, ensuring the display range matches the actual signal distribution.

HandleDefaultEffect
MinAuto-detectedPixels at or below this value become black/transparent
MaxAuto-detectedPixels at or above this value become full brightness

Use cases:

  • Raise Min to remove background noise and autofluorescence
  • Lower Max to brighten dim signals
  • Typical range for DAPI: Min 100–500, Max 1000–5000

How it works:

Pixel values are linearly mapped from the [Min, Max] range to [0, 1] for display:

display = clamp((pixel - min) / (max - min), 0, 1)

  • A pixel with value 500 at Min=100, Max=2000 displays at ~21% brightness
  • The same pixel at Min=0, Max=500 displays at 100% brightness

Channel Color (Single-band (grayscale) only)

TIP

This control only appears for single-band (grayscale) images such as fluorescence microscopy.

Apply pseudocolor to single-band (grayscale) images for better visualization.

ColorCommon Use
GrayscaleDefault, neutral display
Blue (DAPI)Nuclear staining
Green (FITC)Common fluorophore
Red (Cy3)Common fluorophore
CyanCustom visualization
MagentaCustom visualization
YellowCustom visualization

Use cases:

  • Match the display color to the actual fluorophore used
  • Improve visibility of specific features
  • Create publication-ready images with standard color conventions

Multi-Image Overlay

When a project contains multiple images (e.g., DAPI + Cell Boundary staining), Portrai Explorer automatically enables multi-image overlay mode:

  • Fluorescence channels are composited using additive blending — each channel is assigned a distinct pseudocolor and their signals are summed
  • H&E images (if present) render as the base layer, with fluorescence overlaid on top
  • Each channel has independent controls for color, contrast limits, opacity, and visibility
  • Pixels with no signal are transparent, allowing underlying layers to show through

See Layer Settings - Multi-Image Mode for detailed controls.

Accessing Image Adjustments

  1. Click the Layers button (layer icon) in the map viewer toolbar
  2. In the popover, locate the Image section
  3. For multi-image mode: adjust per-channel settings
  4. For single-image mode: adjust sliders for opacity, brightness, contrast, and saturation
  5. Changes apply immediately

TIP

The Image section only appears when the current projection mode includes a background image (e.g., Spatial view with tissue image).

Resetting Adjustments

Click the Reset button (rotate icon) in the Image layer section to restore all image settings to their defaults:

Standard defaults:

  • Opacity: 1
  • Brightness: 0
  • Contrast: 0
  • Saturation: 0

Additional defaults for single-band (grayscale) images:

  • Contrast Limits: Auto-detected from image data (percentile-based)
  • Channel Color: Grayscale

INFO

The image mode (single-band vs multi-band) is not reset. It is determined by the image file itself.

For H&E Stained Tissue

Standard histology images:

  • Brightness: 0 to +0.2
  • Contrast: 0 to +0.2
  • Saturation: -0.3 to 0

For Fluorescence Images

Single-band (grayscale) fluorescence images (automatically detected):

  • Contrast Limits: Auto-detected; fine-tune if needed based on signal strength
  • Channel Color: Match to fluorophore (e.g., Blue for DAPI)
  • Brightness: 0 (use Contrast Limits instead)
  • Contrast: 0 to +0.2
  • Saturation: 0 (not applicable for pseudocolor)

For Data Focus

When data points are the priority:

  • Opacity: 0.3 to 0.7
  • Brightness: -0.2 to 0
  • Contrast: -0.2 to 0
  • Saturation: -0.5 to -1 (grayscale)

For Presentation

Clean, professional look:

  • Brightness: 0 to +0.1
  • Contrast: +0.1 to +0.2
  • Saturation: -0.2 to 0

Image Adjustments in Exports

When exporting views:

  • Image adjustments are applied to exported images
  • What you see is what you get
  • Adjust settings before exporting for best results

Tips

  1. Start subtle - Small adjustments (±0.1 to ±0.2) often work best
  2. Adjust together - Brightness and contrast often work best when adjusted in tandem
  3. Consider your goal - Exploration vs presentation needs differ
  4. Use reset liberally - Easy to start fresh if adjustments go too far

Troubleshooting

Image Too Dark or Bright

  • Use the reset button to restore defaults
  • Adjust brightness slider
  • Check that contrast isn't at an extreme value

Colors Look Washed Out

  • Check saturation isn't set to -1 (grayscale)
  • Increase saturation slightly
  • Reset to defaults

Image Layer Section Not Visible

  • Switch to a projection mode with a background image (e.g., Spatial)
  • Not all projection modes include raster images

Portrai Explorer Documentation