@prefix dct: .
@prefix orcid: .
@prefix this: .
@prefix sub: .
@prefix schema: .
@prefix bpmn: .
@prefix np: .
@prefix owl: .
@prefix npx: .
@prefix pplan: .
@prefix xsd: .
@prefix rdfs: .
@prefix prov: .
sub:Head {
this: np:hasAssertion sub:assertion;
np:hasProvenance sub:provenance;
np:hasPublicationInfo sub:pubInfo;
a np:Nanopublication .
}
sub:assertion {
sub:LinguisticSystem a schema:ComputerLanguage;
rdfs:label "python";
rdfs:seeAlso ;
owl:versionInfo "3.7.9.final.0" .
sub:img a pplan:Variable;
rdfs:comment "None";
rdfs:label "img" .
sub:out1 a pplan:Variable;
rdfs:comment "None";
rdfs:label "out1" .
sub:step dct:description """@is_fairstep(label='Make white background of image transparent')
def white_to_transparency(img):
from PIL import Image
img = img.convert(\"RGBA\")
data = img.getdata()
new_data = []
for item in data:
if item[0] == 255 and item[1] == 255 and item[2] == 255:
new_data.append((255, 255, 255, 0))
else:
new_data.append(item)
img.putdata(new_data)
return img
""";
dct:language sub:LinguisticSystem;
pplan:hasInputVar sub:img;
pplan:hasOutputVar sub:out1;
a bpmn:ScriptTask, pplan:Step;
rdfs:label "Make white background of image transparent" .
}
sub:provenance {
sub:assertion prov:generatedAtTime "2021-06-14T14:54:06.640868"^^xsd:dateTime .
}
sub:pubInfo {
sub:assertion prov:wasDerivedFrom .
sub:sig npx:hasAlgorithm "RSA";
npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5qs1vOATpmVyz3yKjvM8E5TfLUFPQzPgg1JKJxsNSaZAa28Jst9c+rzIOfICxuNfn/c3iG2qLur2zaKxPkAURsI9Dn2ZumFijhoFf3VpsZB3mKNhZ1kLqz/ytIQh/PUAW9c1+lTx/zQZPkHJbUgb7subzMMoJJTMWaZ+VtPrA3QIDAQAB";
npx:hasSignature "ZNj6qtA6x449w9hGfGfPOYHk9k2DiFcPvuUzMvQj0i4/53dT+/j4fZWnJOHTrb+QrA6Py29HRqTxtU0lNOqAle4Znd26GZYkySwow0B43VNuGRw6XWwznR7lgUphrgqG+zPrTmLyPB/+bUd/k/1TmARZXUq38eTC4CQ6gDajutY=";
npx:hasSignatureTarget this: .
this: npx:introduces sub:step;
prov:generatedAtTime "2021-06-14T14:54:06.640868"^^xsd:dateTime;
prov:wasAttributedTo orcid:0000-0000-0000-0000 .
}