POV-Ray : Newsgroups : povray.documentation.inbuilt : BITMAP_TYPE and HF_TYPE documentation versus functionality. : Re: BITMAP_TYPE and HF_TYPE documentation versus functionality. Server Time
25 Apr 2024 21:15:34 EDT (-0400)
  Re: BITMAP_TYPE and HF_TYPE documentation versus functionality.  
From: Kenneth
Date: 8 Jan 2018 20:40:01
Message: <web.5a541c494e3ec03a47873e10@news.povray.org>
I wanted to clearly understand all of this behavior (in Windows), so I made an
image_map test-- the four permutations of using (or not using) BITMAP_TYPE and
the image's file extension... along with a chosen Output_File_Type in my
resolution .ini file.

TEST 1 should be with Output_File_Type=N  (to match the .png image used below.)
TEST 2 should be with Output_File_Type=J (or B,P,T etc.-- to purposely mismatch
the input image type.)

RESULTS: TEST 1 works successfuly with all four examples.
         TEST 2 fails on the last example-- a mismatch between image
                type and Output_File_Type.

---------------
#version 3.71;
global_settings {assumed_gamma 1.0 max_trace_level 5}

camera {
  perspective
  location  <.5, .5, -2>
  look_at   <.5, .5,  0>
  right     x*image_width/image_height
  angle 67
}

// Typical use. This *always* works, of course.
box{0, <1,1,.01>
    pigment{image_map{png "MY_IMAGE.png"}}
    scale .5
    }

// BITMAP_TYPE but no file extension.
// This works with both TEST 1 and TEST 2
box{0, <1,1,.01>
    pigment{image_map{png "MY_IMAGE"}}
    scale .5
    translate .5
    }

// No BITMAP_TYPE but with the file extension.
// This works with both TEST 1 and TEST 2
box{0, <1,1,.01>
    pigment{image_map{"MY_IMAGE.png"}}
    scale .5
    translate 1
    }

// No BITMAP_TYPE or file extension.
// This works with TEST 1 but fails with TEST 2.
box{0, <1,1,.01>
    pigment{image_map{"MY_IMAGE"}}
    scale .5
    translate 1.5
    }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.