Files
test2/source/blender/imbuf/intern/openexr/openexr_stub.cpp
Campbell Barton af1110fb3c Render: support pixel density in the render pipeline
Add a "Pixel Density" sub-panel to render output settings which
can be used to set the density (as pixels per inch for example).

This is then written to images that support pixel density.

Details:

- The scene has two values a PPM factor and a and base unit.
- The base unit defaults to pixels per inch as this is the most
  common unit used.
- Unit presets for pixels per inch/centimeter/meter are included.
- The pixel density is stored in the render result & EXR cache.
- For non 1:1 aspect renders, the density increases on the axis
  which looks "stretched", so the PPM will print the correct
  aspect with non-square pixels.

Ref !127831
2025-04-05 08:49:22 +00:00

89 lines
2.7 KiB
C++

/* SPDX-FileCopyrightText: 2005 `Gernot Ziegler <gz@lysator.liu.se>`. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup openexr
*/
#include "IMB_openexr.hh"
void *IMB_exr_get_handle()
{
return nullptr;
}
void *IMB_exr_get_handle_name(const char * /*name*/)
{
return nullptr;
}
void IMB_exr_add_channel(void * /*handle*/,
const char * /*layname*/,
const char * /*passname*/,
const char * /*view*/,
int /*xstride*/,
int /*ystride*/,
float * /*rect*/,
bool /*use_half_float*/)
{
}
bool IMB_exr_begin_read(void * /*handle*/,
const char * /*filepath*/,
int * /*width*/,
int * /*height*/,
const bool /*add_channels*/)
{
return false;
}
bool IMB_exr_begin_write(void * /*handle*/,
const char * /*filepath*/,
int /*width*/,
int /*height*/,
const double /*ppm*/[2],
int /*compress*/,
int /*quality*/,
const StampData * /*stamp*/)
{
return false;
}
bool IMB_exr_set_channel(void * /*handle*/,
const char * /*layname*/,
const char * /*passname*/,
int /*xstride*/,
int /*ystride*/,
float * /*rect*/)
{
return false;
}
void IMB_exr_read_channels(void * /*handle*/) {}
void IMB_exr_write_channels(void * /*handle*/) {}
void IMB_exr_multilayer_convert(void * /*handle*/,
void * /*base*/,
void *(* /*addview*/)(void *base, const char *str),
void *(* /*addlayer*/)(void *base, const char *str),
void (* /*addpass*/)(void *base,
void *lay,
const char *str,
float *rect,
int totchan,
const char *chan_id,
const char *view))
{
}
void IMB_exr_close(void * /*handle*/) {}
void IMB_exr_add_view(void * /*handle*/, const char * /*name*/) {}
bool IMB_exr_has_multilayer(void * /*handle*/)
{
return false;
}
bool IMB_exr_get_ppm(void * /*handle*/, double /*ppm*/[2])
{
return false;
}