Recent

Author Topic: bgrabitmap.pas unused units  (Read 2518 times)

quantumfoam

  • New Member
  • *
  • Posts: 23
bgrabitmap.pas unused units
« on: October 25, 2021, 05:12:04 pm »
Just short question for Circular. Is the uses clause after implementation in bgrabitmap.pas needed? (uses BGRAReadBMP ... BGRAWriteWebP; ). My project has -MDelphi and can not compile libwebp because of this. (I don't need webp or other format except svg anyways). I don't want to delete it myself - not sure about licencing terms after changing sources.
Could you please delete it in next version (if really not needed as I suppose) or put it in some directive? Thanks.

CCRDude

  • Hero Member
  • *****
  • Posts: 596
Re: bgrabitmap.pas unused units
« Reply #1 on: October 25, 2021, 07:53:16 pm »
A simple way to check if a unit is needed: open it and check its initialization section. If it has one, it might be required simply for that. In this case, it sets the default readers for file formats. Removing that would break code.

quantumfoam

  • New Member
  • *
  • Posts: 23
Re: bgrabitmap.pas unused units
« Reply #2 on: October 25, 2021, 09:14:19 pm »
Well. You're right. I'm new to BGRABitmap so I just followed svg example which worked even with uses commented.
Thanks anyway.

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: bgrabitmap.pas unused units
« Reply #3 on: October 29, 2021, 02:31:45 am »
You can indeed comment out readers. They are not necessary, unless of course you want to read the specific file format.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018