그림에 텍스트 추가@lwx228 물었다 이미지가 로드된 셀에 텍스트를 어떻게 추가합니까?이 아이디어는 매우 간단합니다. 사진을 프레임 상자에 넣고, 그래픽 스크립트를 사용하여 장식하고, 새 사진을 찍습니다. 멋진 왕복 이미지를 얻기 위한 세부 사항은 조금 더 복잡합니다. 프레임의 크기와 배율을 조정하고 그림을 배치하고 최종 이미지를 잘라야 합니다.
// open the original
original = New Image(
"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Oroblanco_%28sweetie%29_fruits.jpg/320px-Oroblanco_%28sweetie%29_fruits.jpg"
);
{xSize, ySize} = original << size;
// use a frame to do the drawing, make the original fit the frame exactly
gb = Graph Box(
<<BACKGROUNDCOLOR></BACKGROUNDCOLOR>
아래의 결과는 장식으로 프레임 상자를 채우는 이미지와 아래 세 개의 이미지를 보여줍니다. 왼쪽 이미지가 원본, 가운데가 수정된 이미지, 오른쪽이 차이 이미지입니다. 차이는 대부분 검은색이고 변화가 없어 좋습니다. 앤티앨리어싱으로 인해 텍스트 가장자리가 미묘하게 변경되었기 때문에 차이의 텍스트가 흐릿합니다.
Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.Circles and text added on top of fruit picture.과일 그림 위에 원과 텍스트가 추가되었습니다.
사진 출처 JPG 이미지 자르기 자르기 작동 방식을 설명합니다.
더보기...
Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.Use a graphics frame box to add text and lines on top of a picture.그래픽 프레임 상자를 사용하여 그림 위에 텍스트와 선을 추가합니다.
프레임 상자를 사용하여 그림에 텍스트와 선을 추가합니다.
Re: 그림에 텍스트 추가확인
크레이지 감사합니다!
gb[framebox(1)]<<ADD image=""></ADD>
Re: 사진에 텍스트를 추가하세요예. 조금 더 어렵습니다. 아래에 설명이 있습니다.
// open the original
original = New Image(
"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Oroblanco_%28sweetie%29_fruits.jpg/320px-Oroblanco_%28sweetie%29_fruits.jpg"
);
{xSize, ySize} = original << size;
overlay1 = new image("https://us.v-cdn.net/6038925/uploads/images/35680iA0171FFF13D53E06/NaturalCat.png");// cat
{xOverlay1Size, yOverlay1Size} = overlay1 << size;
dt = open("$sample_data/big class families.jmp","invisible");
overlay2 = dt:picture[1];// katie
overlay2<<SCALE></SCALE>
<P> </P>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pictures added over another picture." style="width: 971px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Pictures added over another picture." style="width: 971px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Pictures added over another picture." style="width: 971px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Pictures added over another picture." style="width: 971px;"><span class="lia-inline-image-display-wrapper" image-alt="Pictures added over another picture." style="width: 971px;"><img src="https://us.v-cdn.net/6038925/uploads/images/43745i912405FE3CFBC3E8/PicturePlusPicture.png" role="button" title="PicturePlusPicture.png" alt="Pictures added over another picture." /><span class="lia-inline-image-caption" onclick="event.preventDefault();">Pictures added over another picture.</span></span><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">Pictures added over another picture.</SPAN></SPAN><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">Pictures added over another picture.</SPAN></SPAN><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">Pictures added over another picture.</SPAN></SPAN><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">다른 사진 위에 사진이 추가되었습니다.</SPAN></SPAN></P>
<P>그래픽 스크립트는 그림을 추가할 수 없습니다. < <ADDIMAGE message="" instead.=""><></ADDIMAGE></P><P> </P>
<P>GraphBox(...) 함수는 매개변수, 메시지, 스크립트라는 세 가지 종류의 인수를 사용합니다. 모범 사례는 매개변수와 메시지를 먼저 배치하고 끝에 단일 스크립트를 배치하는 것입니다. 매개변수와 메시지는 쉼표로 구분됩니다. 스크립트는 세미콜론을 사용하여 명령문을 구분합니다.</P>
<P> </P>
<CODE class=" language-jsl">gb = Graph Box(
<<BACKGROUNDCOLOR></BACKGROUNDCOLOR>
<P> </P>
<P>수많은 그래프 상자 스크립트가 세미콜론이 아닌 우연한 쉼표로 작성되었습니다. 각 쉼표는 이전 스크립트와 구분되어 새 스크립트를 시작하게 합니다. JMP에서 여러 스크립트를 실행하는 것은 약간의 추가 오버헤드입니다.</P>
<P> </P>Re: 그림에 텍스트 추가안녕 크레이지!
JSL이 이미지의 지정된 위치에 작은 이미지를 중첩할 수 있는지 궁금합니다.
도움말 매뉴얼을 검색했는데 답을 찾을 수 없었습니다.
그게 내가 생각할 수 있는 전부야.고마워 전문가들!
img = Open( "$SAMPLE_IMAGES/tile.jpg", jpg );
{x, y} = img << size;
img << crop( Left( 100 ), Right( x - 251 ), top( 0 ), bottom( y - 0 ) );
{x1, y1} = img << size;
img2 = Open( "$SAMPLE_IMAGES/black rhino footprint.jpg", jpg );
img << copy;//??
img2 << paste(100,25);//??
obj = New Window( "paste", New Image( img2 ) );<BR />
回复: 그림에 텍스트 추가예를 들어 50%까지 초상화의 투명도를 어떻게 높일 수 있습니까?
감사합니다 전문가!
Re: 그림에 텍스트 추가좋은 질문. 12-18행 참조
Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie is now 50% transparent.Katie는 이제 50% 투명합니다.
// open the original
original = New Image(
"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Oroblanco_%28sweetie%29_fruits.jpg/320px-Oroblanco_%28sweetie%29_fruits.jpg"
);
{xSize, ySize} = original << size;
overlay1 = new image("https://us.v-cdn.net/6038925/uploads/images/35680iA0171FFF13D53E06/NaturalCat.png");// cat
{xOverlay1Size, yOverlay1Size} = overlay1 << size;
dt = open("$sample_data/big class families.jmp","invisible");
overlay2 = dt:picture[1];// katie
// adjusting transparency. Katie already has a transparent background, alpha=0, and a mostly opaque
// foreground, alpha=1. Katie probably has some antialiasing around the edge of the shape, 0 < alpha < 1.
// rather than set all the alpha for the entire square to .5, multiply the existing alpha by .5.
// this will leave the alpha=0 at 0, and modify the others...
{r,g,b,a} = overlay2<<GETPIXELS></GETPIXELS>
사용하는 것은 실수가 될 것입니다.
{r,g,b,a} = overlay2<<GETPIXELS></GETPIXELS>
이전에 0.0이었던 곳에 0.5를 재밍하여 기존 값을 무시합니다.
The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.The cut-away parts are no longer completely transparent.잘라낸 부분은 더 이상 완전히 투명하지 않습니다.
[0,0]은 a를 스칼라로 변경하는 대신 행렬 할당을 수행합니다. 밝은 회색 사각형은 투명한 컷 어웨이 픽셀이 흰색일 가능성이 있음을 알려주며 어두운 회색 앞에 50%로 배치하면 더 밝은 회색이 됩니다.
回复: 그림에 텍스트 추가크레이지 감사합니다! JSL의 드로잉 창에서 x축 및 y축 값을 직접 제거하고 x축 및 y축 레이블 텍스트를 취소하는 방법은 무엇입니까?

기능: 그림에 텍스트 추가dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p1 = dt << Graph Builder(
Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ), Summary Statistic( "Sum" ) ) )
);
img = p1 << getpicture ;
{r,g,b,a} = img<<GETPIXELS></GETPIXELS>How can Remove white background?Thanks Experts!
Re: 사진에 텍스트를 추가하세요그래프의 투명한 배경색
투명한 배경을 얻는 한 가지 방법은 SVG를 저장한 다음 SVG를 편집하여 배경 사각형을 제거하는 것입니다. Inkscape와 같은 편집기를 사용하거나 JSL을 작성하여 이를 수행할 수 있습니다.
dt = Open( "$sample_data/big class.jmp" );
gb = dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ),
SendToReport(
Dispatch( {}, "Graph Builder", FrameBox,
// I chose fedcba to be unique, used in patmatch below
{Background Color( -Hex To Number( "fedcba" ) )}
)
)
);
gb << savepicture( "$temp/temp.svg", "svg" );
txt = Load Text File( "$temp/temp.svg" );
Write( txt ); // to log, for debugging
/* remove something like this:
<G fill="#FEDCBA">
<RECT stroke="none" x="75.5" y="33.5" width="509" height="420"></RECT>
</G>
*/
rc = Pat Match( txt, "<G fill="\!">" + Pat Arb() >> BadFillPattern + "</G>" );
If( !rc,
Throw( "fill pattern not found" )
);
// the BadFillPattern occurs twice, for two different colors. remove cases of
// <RECT stroke="none" x="75.5" y="33.5" width="509" height="420"></RECT>
// (the svg command that puts a rectangle of color behind the graph's data.)
nfound = 0;
While( Pat Match( txt, BadFillPattern, "" ), nfound += 1 );
If( nfound != 2,
Throw( "nfound=" || Char( nfound ) )
);
Save Text File( "$temp/temp.svg", txt );
// I don't know how you'll load this file on windows to prove it is transparent.
Open( "$temp/temp.svg" ); // this *does* load it, but there is nothing behind it to show through.
// you can open in FireFox and fiddle with the background color to observe the transparency
FireFox background shows through the transparency.FireFox background shows through the transparency.FireFox 배경은 투명도를 통해 표시됩니다.
SVG를 투명한 PNG로 변환하는 Linux 도구가 있다는 것을 알고 있습니다. 이러한 도구는 아마도 Win에도 존재할 것입니다.
편집 : 테스트되지 않은 많은 아이디어 https://stackoverflow.com/questions/6589358/convert-svg-to-png-in-python
Re: 그림에 텍스트 추가네, 저는 지금 항상 이 명령을 사용합니다
run program(executable("I:\00\imdisplay\magick.exe"),options({"C:\3\A1.png -fuzz 0% -transparent white C:\3\A2.png"}));
https://stackoverflow.com/questions/12424018/how-to-replace-white-Background-color-with-transparent-of-an-image-in-imagemagic