ID:141890
 
Code:
mob/verb/Convert()
var/convertfile/F = new("Test.jpg")
Write((F) as "Test.bmp")


Problem description:
Trying to make a simple conversion program, not too positive on byond coding i think ive gone wrong somewhere, basically pointlessly flexing the power of the code with many file types... any assistance as to what im doing wrong in regards to making a conversion program?
Sorry to say, but I doubt you can even do that with DM. You might try searching for a library that does what you need by using an external .dll
In response to CIB
CIB wrote:
Sorry to say, but I doubt you can even do that with DM. You might try searching for a library that does what you need by using an external .dll

I don't believe proper image conversion is possible, no.

At best, you can change the image extension using the fcopy() proc. But then you'll just have a JPG with PNG as it's extension... not really a lot of help there.

As for external .dll files. I'm fairly sure those have to be written in a specific fashion to fit BYOND (I don't know personally, I don't know C and it's sister languages, so I can't be sure), so I don't think any old .dll will work in BYOND.

As for the conversion process it self. You can do it quite easily in something like Adobe Photoshop. But if you don't want to spend the money, Microsoft Paint would be able to handle conversions to a few image types.