File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ def setup_vtk(self):
72
72
mapper .SetInputConnection (cone_source .GetOutputPort ())
73
73
actor = vtkActor ()
74
74
actor .SetMapper (mapper )
75
+ actor .GetProperty ().SetColor (1 , 0.8 , 0.8 )
75
76
76
77
renderer .AddActor (actor )
77
78
renderer .ResetCamera ()
Original file line number Diff line number Diff line change 1
1
from numpy .typing import NDArray
2
- from turbojpeg import TurboJPEG
2
+ from turbojpeg import TurboJPEG , TJPF_RGB
3
3
from trame_rca .encoders .img import TO_IMAGE_TYPE
4
4
# import time
5
5
@@ -43,7 +43,7 @@ def encode_np_img_to_bytes(
43
43
# t0 = time.time()
44
44
image = image .reshape ((cols , rows , - 1 ))
45
45
image = image [::- 1 , :, :]
46
- result = jpeg .encode (image , quality = quality )
46
+ result = jpeg .encode (image , quality = quality , pixel_format = TJPF_RGB )
47
47
# t1 = time.time()
48
48
# print(f"tubo-jpeg encode {t1-t0:.04f}s")
49
49
You can’t perform that action at this time.
0 commit comments