• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

[Fixed] Convert dds to png into a stream

Started by Shira, 3 May 2019, 19:01:14

Previous topic - Next topic

Shira

3 May 2019, 19:01:14 Last Edit: 3 May 2019, 22:46:36 by Shira
Hi, I am able to load a .dds file and save it to a .png, but how can do I to onto a stream instead?

This generates an empty file:

Var Img: TImageData;
      tm: TMemoryStream;

  tm := TMemoryStream.Create;
  InitImage(Img);
  LoadImageFromFile('Z:\xx.dds', Img);
  SaveImageToStream('.png',tm,Img);
  tm.SaveToFile('z:\xxx.png');
  tm.free;
  FreeImage(Img);


Edit: found the issue, '.png' -> 'png'

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk