MBS Dynapdf highest resolution for insert a logo

Clarification to insert a Logo on an invoice with the highest resolution:
1 what kind of file use (jpg, png, tif or other)
2 what method to use A or B

A)
Logo = Getfolderitem(“MioLogo.jpg”)
dim p as Picture = Picture.Open(Logo)
call pdf.InsertPicture(p, xx, yy, ww, hh)

B)
Logo = Getfolderitem(“MioLogo.jpg”)
call pdf.ReadImageFormat2(Logo, 1, iWidth, iHeight, iBitsPerPixel, iUseZip)
dim tmpl as integer = pdf.InsertImageEx(xx, yy, ww, hh, Logo, 1)

In both cases with:
call pdf.SetUseTransparency(false)
call pdf.SetResolution(300)
call pdf.SetCompressionFilter(pdf.kcfFlate)
call pdf.SetSaveNewImageFormat(false)

jpeg may get smaller image data size.

and second question ?

A compresses the picture you provide with the current settings which looks like 300 dpi and flate compression.

B embeds the JPEG you have as it is.

Both are different and sometimes you may prefer one of them.