Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Missing jpeg in XE2 and higher


I noticed that SmartInspect.pas uses jpeg unit. The point is that Delphi XE2 has changed namespaces, so there is no longer jpeg.dcu but VCL.imaging.jpeg.dcu.

In order to make it work, it is necessary:

  1. Add new define in

{$IF CompilerVersion >= 23}
{$IF CompilerVersion >= 24}

  1. Change SmartInpect.pas uses declaration:


kind regards
Piotr Rezmer


Hello Piotr,

Thanks for your posting. Do you have issues compiling SmartInspect because of this? I’m asking as we don’t have issues with this here and I suspect that Delphi usually uses an alias to map the old unit names to the new namespace (for backward compatibility).



I have installed Delphi XE using ISO image from Embarcadero registered users download page. So it contains update 1. As far as “Tools|Options|Delphi Options| Library|unit scope name” it is empty by default. Project Options| Delphi Compiler| Unit Scope names contain:


I didn’t change those values manually

I found the reason. The project was used under Delphi XE before. Probably when “Unit scope names” is already set (if project was used in earlier version of Delphi), XE2 will not update it.

If I create new project under XE2, it has following unit scope names:


This is why, there is no problem to use SmartInspect in brand new application under XE2.

Thanks for hint.

kind regards
Piotr Rezmer


Thanks for the detailed feedback Piotr, it’s appreciated. We will still look into moving to the new namespaces in future updates where it makes sense (for new Delphi version only, obviously).