Skip to content

LoadImageFromPNG - how to #13

@SummerSeaSun

Description

@SummerSeaSun

This is the prosecution of:
ajstarks#21

I've edited the function like this:

void image_show(int w, int h, char*filename) {
  fprintf(stdout, "inizio\n");

  Start(w, h);
//  VGImage sub_desert = LoadImageFromPNG(const char *filename, VGint *w, VGint
  *h);
  VGImage sub_desert = CreateImageFromPng(const char *filename, VGint *w, VGint
  *h);
  DrawImageAt( 0, 0, sub_desert);
  vgDestroyImage();
}

image_show(1280,800, "/home/pi/img/the");

compilation will result in this error


33:24: warning: implicit declaration of function ‘LoadImageFromPNG’ [-Wimplicit-function-declaration]
   VGImage sub_desert = LoadImageFromPNG(const char *filename, VGint *w, VGint *h);
                        ^~~~~~~~~~~~~~~~
osd_background.c:33:41: error: expected expression before ‘const’
   VGImage sub_desert = LoadImageFromPNG(const char *filename, VGint *w, VGint *h);
                                         ^~~~~


or  with CreateImageFromPng
:33:43: error: expected expression before ‘const’
   VGImage sub_desert = CreateImageFromPng(const char *filename, VGint *w, VGint

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions