Skip to content

Commit

Permalink
CPlot: enable jpg output for display360
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit128 committed Jul 8, 2024
1 parent b04fd41 commit 0b97f0a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
25 changes: 16 additions & 9 deletions Cassiopee/CPlot/CPlot/PyTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1205,21 +1205,28 @@ def display360(t, type360=0, **kwargs):
C._addVars(a, ['r','g','b','a'])
for v in ['r','g','b','a']:
pr = Internal.getNodeFromName2(a, v)[1]
pr1 = Internal.getNodeFromName2(a1, v)[1]
pr2 = Internal.getNodeFromName2(a2, v)[1]
pr[0:ni,0:nj] = pr1[0:ni,0:nj]
pr[0:ni,nj:2*nj] = pr2[0:ni,0:nj]
pr1 = Internal.getNodeFromName2(a1, v)
pr2 = Internal.getNodeFromName2(a2, v)
if pr1 is not None and pr2 is not None:
pr1 = pr1[1]; pr2 = pr2[1]
pr[0:ni,0:nj] = pr1[0:ni,0:nj]
pr[0:ni,nj:2*nj] = pr2[0:ni,0:nj]
else:
pr[0:ni, 0:2*nj] = 1.
else: # 180
ni = int(locRez[1]); nj = int(locRez[1])
a = G.cart((0,0,0), (1,1,1), (2*ni,nj,1))
C._addVars(a, ['r','g','b','a'])
for v in ['r','g','b','a']:
pr = Internal.getNodeFromName2(a, v)[1]
pr1 = Internal.getNodeFromName2(a1, v)[1]
pr2 = Internal.getNodeFromName2(a2, v)[1]
pr[0:ni,0:nj] = pr1[0:ni,0:nj]
pr[ni:2*ni,0:nj] = pr2[0:ni,0:nj]

pr1 = Internal.getNodeFromName2(a1, v)
pr2 = Internal.getNodeFromName2(a2, v)
if pr1 is not None and pr2 is not None:
pr1 = pr1[1]; pr2 = pr2[1]
pr[0:ni,0:nj] = pr1[0:ni,0:nj]
pr[ni:2*ni,0:nj] = pr2[0:ni,0:nj]
else:
pr[0:2*ni,0:nj] = 1.
C.convertPyTree2File(a, export) # finale
Cmpi.barrier() # wait for completion
return None
Expand Down
2 changes: 1 addition & 1 deletion Cassiopee/Converter/Converter/IO/GenIO_binjpg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ E_Int K_IO::GenIO::jpgread(
E_Int nc = cinfo.output_components;
E_Int nil = cinfo.output_width;
E_Int njl = cinfo.output_height;
printf("size=" SF_D2_ ", components=" SF_D_ "\n", nil, njl, nc);
//printf("size=" SF_D2_ ", components=" SF_D_ "\n", nil, njl, nc);

varString = new char [128];

Expand Down

0 comments on commit 0b97f0a

Please sign in to comment.