MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / encodeImageToBase64

Method encodeImageToBase64

ChatView/ClientInterface.cpp:682–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682QString ClientInterface::encodeImageToBase64(const QString &filePath) const
683{
684 QFile file(filePath);
685 if (!file.open(QIODevice::ReadOnly)) {
686 LOG_MESSAGE(QString("Failed to open image file: %1").arg(filePath));
687 return QString();
688 }
689
690 QByteArray imageData = file.readAll();
691 file.close();
692
693 return imageData.toBase64();
694}
695
696QVector<PluginLLMCore::ImageAttachment> ClientInterface::loadImagesFromStorage(
697 const QList<ChatModel::ImageAttachment> &storedImages) const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected