XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Fri Sep 22, 2017 10:55 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Noesis fmtWriteRGBA method
PostPosted: Tue Apr 25, 2017 10:13 am 
Offline
n00b

Joined: Mon Nov 09, 2009 7:26 pm
Posts: 12
Has thanked: 1 time
Have thanks: 2 times

I am trying to generate a file with Noesis from a PNG file.

So, I load a PNG file with Noesis, and I try to export it to my own format
The next code is launched.

Code:
def fmtWriteRGBA(data, width, height, bsOut):
   datasize = len(data)
   print(datasize)
   image = rapi.imageEncodeRaw(data, width, height, "r8g8b8a8")
   datasize = len(image)
   print(datasize)
   bsOut = NoeBitStream(image)
   return 1


My doubt is, datasize is not null, but when I do
bsOut = NoeBitStream(image) or bsOut = NoeBitStream(data)
noesis generates a 0bytes file with of course 0 len.

How can I export this PNG file?

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: Noesis fmtWriteRGBA method
PostPosted: Tue Apr 25, 2017 2:12 pm 
Offline
n00b

Joined: Mon Nov 09, 2009 7:26 pm
Posts: 12
Has thanked: 1 time
Have thanks: 2 times
Got it

Code:
   
mipData = rapi.imageResample(data, width, height, width, height)
bsOut.writeBytes(mipData)


this write the previous png to bytearray file



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group